summaryrefslogtreecommitdiff
path: root/webpack.config.js
blob: 9e2680e8327a1df04537f370e0f61219173b9b07 (plain)
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,
  },

  plugins: [
    new CopyWebpackPlugin({
      patterns: [
        { from: __dirname + '/node_modules/codemirror/mode/twig/twig.js', to: __dirname + '/assets/codemirror/mode/twig/twig.js' },
        { from: __dirname + '/node_modules/codemirror/theme', to: __dirname + '/assets/codemirror/theme' },
      ],
    }),
  ],

  // minimize copied js and css
  optimization: {
    minimizer: [
      `...`,
      new CssMinimizerPlugin(),
    ],
  },
};