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
If you are targeting older browsers youneed to transpile `react-async` with babel.
20
+
This project targets the latest ECMAScript version. Our packages on npm do not contain ES5 code for legacy browsers. If you need to target a browser which does not support the latest version of ECMAScript, you'll have to handle transpilation yourself. Usually this will automatically be handled by the framework you use (CRA, Next.js, Gatsby), but sometimes you may need to tweak your Webpack settings to transpile `react-async` with Babel.
21
21
22
-
To transpile `node_modules` with babel you need to use a `babel.config.js`, for more information see [babel's documentation](https://babeljs.io/docs/en/configuration#whats-your-use-case).
22
+
To transpile `node_modules` with Babel you need to use a `babel.config.js`, for more information see [Babel's documentation](https://babeljs.io/docs/en/configuration#whats-your-use-case).
23
23
24
24
In your `webpack.config.js` make sure that the rule for `babel-loader`:
25
-
* doesn't exclude `node_modules` from matching via the `exclude` pattern;
26
-
* excludes `core-js` as it shouldn't be transpiled;
27
-
* is passed the `configFile` option pointing to the `babel.config.js` file.
25
+
26
+
- doesn't exclude `node_modules` from matching via the `exclude` pattern;
27
+
- excludes `core-js` as it shouldn't be transpiled;
28
+
- is passed the `configFile` option pointing to the `babel.config.js` file.
28
29
29
30
```
30
31
{
@@ -34,7 +35,7 @@ In your `webpack.config.js` make sure that the rule for `babel-loader`:
34
35
loader: 'babel-loader',
35
36
options: {
36
37
configFile: './babel.config.js',
37
-
// This is recommended to enable when transpiling node_modules to improve build times for consecutive builds.
38
+
// Caching is recommended when transpiling node_modules to speed up consecutive builds
0 commit comments