未验证 提交 e2ca0ac0 编写于 作者: J Joe Haddad 提交者: 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.
上级 e9b2e25c
......@@ -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
) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册