diff options
Diffstat (limited to 'vnext/webpack.config.js')
-rw-r--r-- | vnext/webpack.config.js | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/vnext/webpack.config.js b/vnext/webpack.config.js index d8b7a076..a4bc0081 100644 --- a/vnext/webpack.config.js +++ b/vnext/webpack.config.js @@ -1,4 +1,5 @@ const ESLintPlugin = require('eslint-webpack-plugin'); +const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const TerserPlugin = require('terser-webpack-plugin'); module.exports = (env, argv) => { @@ -8,7 +9,7 @@ module.exports = (env, argv) => { mode: node_env, devtool: dev ? 'source-map' : false, entry: { - 'scripts': [ + 'index': [ __dirname + '/src/index.js' ] }, @@ -26,6 +27,19 @@ module.exports = (env, argv) => { ], loader: 'babel-loader' }, { + test: /\.(css)$/, + use: [ + { + loader: dev ? 'style-loader' : MiniCssExtractPlugin.loader, + }, + { + loader: 'css-loader', + options: { + sourceMap: true, + }, + } + ], + }, { test: /\.(png|jpe?g|gif|svg)$/i, use: [ { |