1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-29 18:52:22 +01:00

WIP: use raw-loader to load dependencies

see: https://stackoverflow.com/questions/28969861/managing-jquery-plugin-dependency-in-webpack
This commit is contained in:
Sylvain 2020-09-23 17:20:26 +02:00
parent 39ff1269a3
commit 5cbb40f064
4 changed files with 21 additions and 2 deletions

View File

@ -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();

View File

@ -0,0 +1,8 @@
module.exports = {
test: /node_modules.*\.js$/,
use: [
{
loader: 'raw-loader'
}
]
};

View File

@ -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"

View File

@ -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"