-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Description
As of Babel-preset-env 7.0.0-beta.51, there has been additional validation on the settings that react-starter-kit webpack.config.js fails to validate against and so the module build fails:
Module build failed: Error: [BABEL] my-project\src\client.js: Invalid Option: 'false' is not a valid value for 'targets.forceAllTransforms'
Related issue babel/babel#8156
According to the documentation at https://babeljs.io/docs/en/next/babel-preset-env.html#forcealltransforms
The forceAllTransforms property should be set in the root of the preset settings object:
module.exports = {
presets: [
["@babel/preset-env", {
targets: {
chrome: 59,
edge: 13,
firefox: 50,
},
forceAllTransforms: process.env === "production"
}],
],
};
whereas in react-starter-kit it is set as a property of targets:
module.exports = {
presets: [
["@babel/preset-env", {
targets: {
browsers: pkg.browserslist,
forceAllTransforms: process.env === "production"
},
modules: false,
useBuiltIns: false,
debug: false,
}],
],
};
I don't think that the forceAllTransforms option is being respected even when using babel/preset-env 7.0.0-beta.44
Metadata
Metadata
Assignees
Labels
No labels