diff --git a/config/webpack/environment.js b/config/webpack/environment.js index 1e23dbaa3..7c3bf304c 100644 --- a/config/webpack/environment.js +++ b/config/webpack/environment.js @@ -9,6 +9,7 @@ const sass = require('./loaders/sass'); const sassErb = require('./loaders/sass_erb'); const html = require('./loaders/html'); const uiTour = require('./loaders/ui-tour'); +const nodeModules = require('./loaders/node_modules'); environment.plugins.prepend('Provide', new webpack.ProvidePlugin({ $: 'jquery', @@ -31,6 +32,7 @@ environment.loaders.prepend('js', js); environment.loaders.append('html', html); environment.loaders.append('sass', sass); environment.loaders.append('uiTour', uiTour); +environment.loaders.append('nodeModules', nodeModules); environment.splitChunks(); diff --git a/config/webpack/loaders/node_modules.js b/config/webpack/loaders/node_modules.js new file mode 100644 index 000000000..885b5fcef --- /dev/null +++ b/config/webpack/loaders/node_modules.js @@ -0,0 +1,8 @@ +module.exports = { + test: /node_modules.*\.js$/, + use: [ + { + loader: 'raw-loader' + } + ] +}; diff --git a/package.json b/package.json index a4a62fad3..5785dc24e 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "html-loader": "^1.3.0", "ngtemplate-loader": "^2.1.0", "rails-erb-loader": "^5.5.2", + "raw-loader": "^4.0.1", "resolve-url-loader": "^3.1.1", "webpack": "^4.44.1", "webpack-dev-server": "^3.11.0" diff --git a/yarn.lock b/yarn.lock index 57b5a95b4..8a62cc3a6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4893,12 +4893,12 @@ jquery-ujs@^1.2.2: dependencies: jquery ">=1.8.0" -"jquery@>= 1.7.x", jquery@>=1.7.1, jquery@>=1.9.0, jquery@>=3.5.0: +"jquery@>= 1.7.x", jquery@>=1.7.1, jquery@>=1.9.0: version "3.5.0" resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.5.0.tgz#9980b97d9e4194611c36530e7dc46a58d7340fc9" integrity sha512-Xb7SVYMvygPxbFMpTFQiHh1J7HClEaThguL15N/Gg37Lri/qKyhRGZYzHRyLH8Stq3Aow0LsHO2O2ci86fCrNQ== -jquery@>=1.8.0: +jquery@>=1.8.0, jquery@>=3.5.0: version "3.5.1" resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.5.1.tgz#d7b4d08e1bfdb86ad2f1a3d039ea17304717abb5" integrity sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg== @@ -7185,6 +7185,14 @@ raw-body@2.4.0: iconv-lite "0.4.24" unpipe "1.0.0" +raw-loader@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-4.0.1.tgz#14e1f726a359b68437e183d5a5b7d33a3eba6933" + integrity sha512-baolhQBSi3iNh1cglJjA0mYzga+wePk7vdEX//1dTFd+v4TsQlQE0jitJSNF1OIP82rdYulH7otaVmdlDaJ64A== + dependencies: + loader-utils "^2.0.0" + schema-utils "^2.6.5" + read-cache@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774"