diff --git a/packages/taro-mini-runner/src/webpack/build.conf.ts b/packages/taro-mini-runner/src/webpack/build.conf.ts index e03e92536557..4332c5e4f0b1 100644 --- a/packages/taro-mini-runner/src/webpack/build.conf.ts +++ b/packages/taro-mini-runner/src/webpack/build.conf.ts @@ -204,11 +204,11 @@ export default (appPath: string, mode, config: Partial): any => { terser ? terser.config : {} ])) } - - if (isCssoEnabled) { - const cssoConfig: any = csso ? csso.config : {} - plugin.cssoWebpackPlugin = getCssoWebpackPlugin([cssoConfig]) - } + } + + if (isCssoEnabled) { + const cssoConfig: any = csso ? csso.config : {} + plugin.cssoWebpackPlugin = getCssoWebpackPlugin([cssoConfig]) } chain.merge({