@@ -1,5 +1,6 @@
|
|||||||
/js/tests/*
|
/js/tests/*
|
||||||
/js/vendor/*
|
/js/vendor/*
|
||||||
|
/js/legacy/*
|
||||||
/js/node_modules/*
|
/js/node_modules/*
|
||||||
/js/public/*
|
/js/public/*
|
||||||
/karma.conf.js
|
/karma.conf.js
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
node: {
|
node: {
|
||||||
@@ -27,7 +27,7 @@ module.exports = {
|
|||||||
test: /\.css$/,
|
test: /\.css$/,
|
||||||
use: [
|
use: [
|
||||||
MiniCssExtractPlugin.loader,
|
MiniCssExtractPlugin.loader,
|
||||||
"css-loader"
|
'css-loader'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -38,25 +38,26 @@ module.exports = {
|
|||||||
/* separate vendor chunk for node_modules and legacy scripts */
|
/* separate vendor chunk for node_modules and legacy scripts */
|
||||||
commons: {
|
commons: {
|
||||||
test: /[\\/]node_modules[\\/]/,
|
test: /[\\/]node_modules[\\/]/,
|
||||||
name: "vendor",
|
name: 'vendor',
|
||||||
chunks: "all"
|
chunks: 'all'
|
||||||
},
|
},
|
||||||
legacy: {
|
legacy: {
|
||||||
test: /[\\/]legacy[\\/]/,
|
test: /[\\/]legacy[\\/]/,
|
||||||
name: "vendor",
|
name: 'vendor',
|
||||||
chunks: "all"
|
chunks: 'all'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/* use external jQuery from server */
|
||||||
externals: {
|
externals: {
|
||||||
"jquery": "jQuery"
|
'jquery': 'jQuery'
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new MiniCssExtractPlugin('css/[name].css'),
|
new MiniCssExtractPlugin('[name].css'),
|
||||||
new webpack.ProvidePlugin({
|
new webpack.ProvidePlugin({
|
||||||
$: "jquery",
|
$: 'jquery',
|
||||||
jQuery: "jquery"
|
jQuery: 'jquery'
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user