You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// babel-loader, swc-loader, esbuild-loader, or anything you like to transpile JSX should go here.
35
-
// If you are using rspack, the rspack's buiilt-in react transformation is sufficient.
36
-
// { loader: 'swc-loader' },
37
-
// Now add forgetti-loader
38
-
{
39
-
loader: reactCompilerLoader,
40
-
options:defineReactCompilerLoaderOption({
41
-
// React Compiler options goes here
42
-
})
43
-
}
44
-
]
45
-
}
46
-
]
29
+
{
30
+
test:/\.[mc]?[jt]sx$/i,
31
+
exclude:/node_modules/,
32
+
use: [
33
+
// babel-loader, swc-loader, esbuild-loader, or anything you like to transpile JSX should go here.
34
+
// If you are using rspack, the rspack's buiilt-in react transformation is sufficient.
35
+
// { loader: 'swc-loader' },
36
+
// Now add forgetti-loader
37
+
{
38
+
loader: reactCompilerLoader,
39
+
options:defineReactCompilerLoaderOption({
40
+
// React Compiler options goes here
41
+
})
42
+
}
43
+
]
44
+
}
47
45
]
48
46
}
49
47
};
50
48
```
51
49
52
50
### Next.js
53
51
54
-
Next.js has already intergrated the React Compiler and can be enabled with the following configuration:
52
+
Next.js has already integrated the React Compiler and can be enabled with the following configuration:
55
53
56
54
```js
57
55
// next.config.js
@@ -62,7 +60,7 @@ module.exports = {
62
60
}
63
61
```
64
62
65
-
Using Next.js built-in React Compiler intergration is highly recommended. But if you insist on going with `react-compiler-webpack`, you can follow use the provided Next.js plugin:
63
+
Using Next.js built-in React Compiler integration is highly recommended. But if you insist on going with `react-compiler-webpack`, you can follow use the provided Next.js plugin:
0 commit comments