1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
module.exports = {
entry: {},
output: {
path: __dirname + '/assets',
},
plugins: [
new CopyWebpackPlugin({
patterns: [
{ from: __dirname + '/node_modules/codemirror/mode/twig/twig.js', to: 'codemirror/mode/twig/twig.js' },
{ from: __dirname + '/node_modules/codemirror/theme', to: 'codemirror/theme' },
],
}),
],
// minimize copied js and css
optimization: {
minimizer: [
`...`,
new CssMinimizerPlugin(),
],
},
};
|