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 you need to transpile `react-async` with babel.
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).
23
+
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.
28
+
29
+
```
30
+
{
31
+
test: /\.(js|jsx)$/,
32
+
exclude: /\/node_modules\/core-js\//,
33
+
use: [{
34
+
loader: 'babel-loader',
35
+
options: {
36
+
configFile: './babel.config.js',
37
+
// This is recommended to enable when transpiling node_modules to improve build times for consecutive builds.
0 commit comments