Skip to content

Commit ce82c60

Browse files
authored
Incldue styled-jsx in swc compiling (#40679)
Tree share the `typeof window` conditions in styled-jsx for edge runtime. Let swc loader go through the styled-jsx assets under node_modules, applying the optimization as well `test-app/server/edge-ssr.js` -155B
1 parent 44afc37 commit ce82c60

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/next/build/webpack-config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,7 @@ export default async function getBaseWebpackConfig(
693693
/next[\\/]dist[\\/]client/,
694694
/next[\\/]dist[\\/]pages/,
695695
/[\\/](strip-ansi|ansi-regex)[\\/]/,
696+
/styled-jsx[\\/]/,
696697
]
697698

698699
// Support for NODE_PATH

0 commit comments

Comments
 (0)