diff options
author | Vitaly Takmazov | 2021-03-24 21:24:35 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2021-03-24 21:24:35 +0300 |
commit | aa5145973a1fe331c06fae5713690ba4eb2df531 (patch) | |
tree | 6c3c3dd6942bf65fc81b82ff607368f9d1ca278d /webpack.config.js | |
parent | ea50fabc95fe0d2a6ac517f3c61bfba6c220e018 (diff) |
webpack: copy sprite.svg to destination
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) { |