Unverified Commit e2ca0ac0 authored by Joe Haddad's avatar Joe Haddad Committed by GitHub

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.
parent e9b2e25c
...@@ -922,11 +922,7 @@ export default async function getBaseWebpackConfig( ...@@ -922,11 +922,7 @@ export default async function getBaseWebpackConfig(
} }
// Patch `@zeit/next-sass` and `@zeit/next-less` compatibility // Patch `@zeit/next-sass` and `@zeit/next-less` compatibility
if ( if (webpackConfig.module && Array.isArray(webpackConfig.module.rules)) {
!isServer &&
webpackConfig.module &&
Array.isArray(webpackConfig.module.rules)
) {
;[].forEach.call(webpackConfig.module.rules, function( ;[].forEach.call(webpackConfig.module.rules, function(
rule: webpack.RuleSetRule rule: webpack.RuleSetRule
) { ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment