fix: useExtraCSS 名称异常

This commit is contained in:
winixt 2023-03-23 19:11:12 +08:00
parent e38f0be344
commit 4f1b300a5d
3 changed files with 10 additions and 5 deletions

View File

@ -109,7 +109,7 @@ export default function createCssWebpackConfig({
browserslist
});
if (isDev && config.useExtraCSS) {
if (!isDev && config.useExtraCSS) {
webpackConfig.plugin('extra-css')
.use(require.resolve('mini-css-extract-plugin'), [{
filename: '[name].[contenthash:8].css',

View File

@ -1,12 +1,12 @@
export default (api) => {
api.describe({
key: 'useExtraCss',
key: 'useExtraCSS',
config: {
schema(joi) {
return joi.boolean();
}
},
default: true
},
default: true
}
});
};

View File

@ -5,5 +5,10 @@ export default {
request: {
base: '/api'
},
chainWebpack(memo) {
memo.output.filename('./static/[name].[contenthash:8].js')
.chunkFilename('./static/[name].[contenthash:8].chunk.js')
.assetModuleFilename('./static/[hash][ext][query]');
},
useExtraCSS: false
};