Skip to content

Commit 9c9d608

Browse files
author
kajan
committed
setup wepback to process newly added styles.scss
1 parent c0e6fe8 commit 9c9d608

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

‎AspNetCoreVueMpa.Web/ClientApp/webpack.config.js‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const VueLoaderPlugin = require('vue-loader/lib/plugin');
22
const glob = require('glob');
33
const path = require('path');
4+
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
45

56
const entries = {};
67
const IGNORE_PATHS = ['unused'];
@@ -28,10 +29,23 @@ module.exports = {
2829
{
2930
test: /\.vue$/,
3031
loader: 'vue-loader',
31-
}
32+
},
33+
{
34+
test: [
35+
path.join(__dirname, 'assets/styles/styles.scss'),
36+
],
37+
use: [
38+
MiniCssExtractPlugin.loader,
39+
'css-loader',
40+
'sass-loader',
41+
]
42+
},
3243
]
3344
},
3445
plugins: [
3546
new VueLoaderPlugin(),
47+
new MiniCssExtractPlugin({
48+
filename: 'css/[name].bundle.css'
49+
}),
3650
]
3751
}

0 commit comments

Comments
 (0)