diff options
Diffstat (limited to 'plugins/base/frontend/webpack.config.js')
-rw-r--r-- | plugins/base/frontend/webpack.config.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/plugins/base/frontend/webpack.config.js b/plugins/base/frontend/webpack.config.js index 3372b37f..fe93ed4f 100644 --- a/plugins/base/frontend/webpack.config.js +++ b/plugins/base/frontend/webpack.config.js @@ -1,6 +1,7 @@ const {join, resolve} = require('path'); const ringUiWebpackConfig = require('@jetbrains/ring-ui/webpack.config'); +const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const pkgConfig = require('./package.json').config; @@ -35,7 +36,7 @@ const webpackConfig = () => ({ { test: /\.s[ac]ss$/i, use: [ - 'style-loader', + MiniCssExtractPlugin.loader, 'css-loader', 'sass-loader', ], @@ -55,7 +56,14 @@ const webpackConfig = () => ({ } ] }, - plugins: [], + plugins: [ + new MiniCssExtractPlugin({ + // Options similar to the same options in webpackOptions.output + // both options are optional + filename: '[name].css', + chunkFilename: '[id].css', + }), + ], output: { path: __dirname + '/dist/' } |