mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-23 04:40:23 +08:00
Further tweak runtime plugin per documentation
This commit is contained in:
@@ -107,12 +107,18 @@ module.exports = function(api, opts, env) {
|
||||
useBuiltIns: true,
|
||||
},
|
||||
],
|
||||
// Polyfills the runtime needed for async/await and generators
|
||||
// Polyfills the runtime needed for async/await, generators, and friends
|
||||
// https://babeljs.io/docs/en/babel-plugin-transform-runtime
|
||||
[
|
||||
require('@babel/plugin-transform-runtime').default,
|
||||
{
|
||||
corejs: false,
|
||||
helpers: false,
|
||||
regenerator: true,
|
||||
// https://babeljs.io/docs/en/babel-plugin-transform-runtime#useesmodules
|
||||
// We should turn this on once the lowest version of Node LTS
|
||||
// supports ES Modules.
|
||||
useESModules: isEnvDevelopment || isEnvProduction,
|
||||
},
|
||||
],
|
||||
isEnvProduction && [
|
||||
|
||||
Reference in New Issue
Block a user