init
This commit is contained in:
35
platform/app/.webpack/rules/extractStyleChunks.js
Normal file
35
platform/app/.webpack/rules/extractStyleChunks.js
Normal file
@@ -0,0 +1,35 @@
|
||||
const ExtractCssChunksPlugin = require('extract-css-chunks-webpack-plugin');
|
||||
|
||||
function extractStyleChunks(isProdBuild) {
|
||||
return [
|
||||
// If you are using the old stylus, you should uncomment this
|
||||
// {
|
||||
// test: /\.styl$/,
|
||||
// use: [
|
||||
// {
|
||||
// loader: ExtractCssChunksPlugin.loader,
|
||||
// options: {
|
||||
// hot: !isProdBuild,
|
||||
// },
|
||||
// },
|
||||
// { loader: 'css-loader' },
|
||||
// { loader: 'stylus-loader' },
|
||||
// ],
|
||||
// },
|
||||
{
|
||||
test: /\.(sa|sc|c)ss$/,
|
||||
use: [
|
||||
{
|
||||
loader: ExtractCssChunksPlugin.loader,
|
||||
options: {
|
||||
hot: !isProdBuild,
|
||||
},
|
||||
},
|
||||
'css-loader',
|
||||
'postcss-loader',
|
||||
],
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
module.exports = extractStyleChunks;
|
||||
Reference in New Issue
Block a user