Last active
September 15, 2020 17:59
-
-
Save amitsingh-007/14cd4cdd36837574909e58deff587490 to your computer and use it in GitHub Desktop.
ES6 supporting browser babel config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const commonPlugins = require("./commonPlugins"); | |
module.exports = api => { | |
api && api.cache(false); | |
const presets = [ | |
[ | |
"@babel/preset-env", | |
{ | |
targets: { esmodules: true }, //For ES6 supporting browsers | |
useBuiltIns: "usage", | |
corejs: 2, | |
modules: false, | |
}, | |
], | |
"@babel/preset-react", | |
]; | |
return { | |
presets, | |
plugins: commonPlugins(), | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment