Skip to content

Commit bc5c07c

Browse files
committed
More Turbopack config
1 parent 3f2324e commit bc5c07c

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

next.config.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,23 @@ const nextConfig = {
2020
scrollRestoration: true,
2121
},
2222
env: {},
23-
turbopack: {},
23+
turbopack: {
24+
resolveAlias: {
25+
'use-sync-external-store/shim': 'react',
26+
raf: require.resolve('./src/utils/rafShim.js'),
27+
28+
// Unfortunately not working at the moment
29+
process: require.resolve('./src/utils/processShim.js'),
30+
31+
// ESLint depends on the CommonJS version of esquery,
32+
// but Webpack loads the ESM version by default. This
33+
// alias ensures the correct version is used.
34+
//
35+
// More info:
36+
// https://github.com/reactjs/react.dev/pull/8115
37+
esquery: 'esquery/dist/esquery.min.js',
38+
},
39+
},
2440
webpack: (config, {dev, isServer, ...options}) => {
2541
if (process.env.ANALYZE) {
2642
const {BundleAnalyzerPlugin} = require('webpack-bundle-analyzer');

0 commit comments

Comments
 (0)