Skip to content

Commit

Permalink
fix: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ValeraS committed Dec 9, 2024
1 parent 91a5665 commit 32437d9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/common/webpack/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -479,12 +479,18 @@ function getCssLoaders(
});

if (isEnvProduction) {
loaders.unshift({loader: MiniCSSExtractPlugin.loader, options: {emit: !isSsr}});
loaders.unshift({
loader: MiniCSSExtractPlugin.loader,
options: {emit: isSsr ? false : undefined},
});
}

if (isEnvDevelopment) {
if (isSsr || config.ssr) {
loaders.unshift({loader: MiniCSSExtractPlugin.loader, options: {emit: !isSsr}});
loaders.unshift({
loader: MiniCSSExtractPlugin.loader,
options: {emit: isSsr ? false : undefined},
});
} else {
loaders.unshift({
loader: require.resolve('style-loader'),
Expand Down

0 comments on commit 32437d9

Please sign in to comment.