diff options
Diffstat (limited to 'webpack.config.js')
-rw-r--r-- | webpack.config.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/webpack.config.js b/webpack.config.js index 8ec5a68b..c2d0dd4e 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,6 +1,7 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const CssMinimizerPlugin = require('css-minimizer-webpack-plugin'); const ESLintPlugin = require('eslint-webpack-plugin'); +const CopyPlugin = require('copy-webpack-plugin'); module.exports = (env, argv) => { const dev = argv.mode !== 'production'; @@ -23,7 +24,6 @@ module.exports = (env, argv) => { 'core-js/modules/web.dom-collections.iterator', __dirname + '/src/main/assets/scripts.js', __dirname + '/src/main/assets/style.css', - 'evil-icons/assets/sprite.svg', 'evil-icons/assets/evil-icons.css' ] }, @@ -50,7 +50,7 @@ module.exports = (env, argv) => { postcssOptions: { plugins: [ 'stylelint', - ['postcss-preset-env', { stage: 0 } ] + ['postcss-preset-env', { stage: 0 }] ] } } @@ -65,7 +65,13 @@ module.exports = (env, argv) => { }, plugins: [ new MiniCssExtractPlugin({ filename: 'style.css' }), - new ESLintPlugin({ files: 'src/main/assets', lintDirtyModulesOnly: true, failOnWarning: false, failOnError: true, fix: false }) + new ESLintPlugin({ files: 'src/main/assets', lintDirtyModulesOnly: true, failOnWarning: false, failOnError: true, fix: false }), + new CopyPlugin({ + patterns: [{ + from: __dirname + '/node_modules/evil-icons/assets/sprite.svg', + to: __dirname + '/src/main/resources/static/' + }], + }), ], }; if (!dev) { |