From e2ca0ac0e8d8bad562d5df3db89794d14cf2911d Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Fri, 4 Oct 2019 22:53:14 -0400 Subject: [PATCH] Fix Legacy CSS Modules on the Server (#8970) CSS Modules run their loader on the server, so we need to patch both variants of the webpack configuration. --- packages/next/build/webpack-config.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/next/build/webpack-config.ts b/packages/next/build/webpack-config.ts index 088e5d7922..67ec13747c 100644 --- a/packages/next/build/webpack-config.ts +++ b/packages/next/build/webpack-config.ts @@ -922,11 +922,7 @@ export default async function getBaseWebpackConfig( } // Patch `@zeit/next-sass` and `@zeit/next-less` compatibility - if ( - !isServer && - webpackConfig.module && - Array.isArray(webpackConfig.module.rules) - ) { + if (webpackConfig.module && Array.isArray(webpackConfig.module.rules)) { ;[].forEach.call(webpackConfig.module.rules, function( rule: webpack.RuleSetRule ) { -- GitLab