We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
this is my config in config.js
const devMode = process.env.NODE_ENV !== 'production'
in optimization:
splitChunks: {
cacheGroups: { styles: { name: 'styles', test: /\.scss|css|sass$/, chunks: 'all', enforce: true } } },
in rules: { test: /.(sass|scss)$/, use: [ devMode ? 'style-loader' : MiniCssExtractPlugin.loader, 'css-loader', 'postcss-loader', 'sass-loader', ], }
in plugin: new MiniCssExtractPlugin({ filename: devMode ? 'css/[name].css' : 'css/[name].[hash].css', chunkFilename: devMode ? 'css/[id].css' : 'css/[id].[hash].css', })
the env is production that view :
but in development :
The text was updated successfully, but these errors were encountered:
@dongqizhen please use for this stackoverflow, gitter or slack, it is bug tracker, not QA service. Thanks!
stackoverflow
gitter
slack
Sorry, something went wrong.
Have you solved this problem, please? I've also met this problem.
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
this is my config in config.js
const devMode = process.env.NODE_ENV !== 'production'
in optimization:
splitChunks: {
in rules:
{
test: /.(sass|scss)$/,
use:
[
devMode ? 'style-loader' : MiniCssExtractPlugin.loader,
'css-loader',
'postcss-loader',
'sass-loader',
],
}
in plugin:
new MiniCssExtractPlugin({
filename: devMode ? 'css/[name].css' : 'css/[name].[hash].css',
chunkFilename: devMode ? 'css/[id].css' : 'css/[id].[hash].css',
})
the env is production that view :

but in development :

The text was updated successfully, but these errors were encountered: