Skip to content

Instantly share code, notes, and snippets.

@amitsingh-007
Last active September 15, 2020 17:54
Show Gist options
  • Save amitsingh-007/60a38c8a3674d72bbcfdd3179701eebf to your computer and use it in GitHub Desktop.
Save amitsingh-007/60a38c8a3674d72bbcfdd3179701eebf to your computer and use it in GitHub Desktop.
Legacy babel config
const commonPlugins = require("./commonPlugins");
module.exports = api => {
api && api.cache(false);
const presets = [
[
"@babel/preset-env",
{
targets: { browsers: ["safari >= 7"] }, //To support old 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