mirror of
https://github.com/abhijithvijayan/web-extension-starter.git
synced 2025-10-07 07:22:37 +02:00
add babel plugins to provide spread operations & destructuring
This commit is contained in:
parent
4e5683c45e
commit
6ac2a747c8
7
.babelrc
7
.babelrc
@ -1,6 +1,7 @@
|
||||
{
|
||||
"presets": [
|
||||
[
|
||||
// Latest stable ECMAScript features
|
||||
"@babel/preset-env",
|
||||
{
|
||||
"targets": {
|
||||
@ -12,9 +13,15 @@
|
||||
]
|
||||
],
|
||||
"plugins": [
|
||||
// Some transforms (such as object-rest-spread)
|
||||
// don't work without it: https://github.com/babel/babel/issues/7215
|
||||
["@babel/plugin-transform-destructuring", { "useBuiltIns": true }],
|
||||
["@babel/plugin-proposal-object-rest-spread", { "useBuiltIns": true }],
|
||||
[
|
||||
// Polyfills the runtime needed for async/await and generators
|
||||
"@babel/plugin-transform-runtime",
|
||||
{
|
||||
"helpers": false,
|
||||
"regenerator": true
|
||||
}
|
||||
]
|
||||
|
||||
@ -20,6 +20,8 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.6.4",
|
||||
"@babel/plugin-proposal-object-rest-spread": "^7.6.2",
|
||||
"@babel/plugin-transform-destructuring": "^7.6.0",
|
||||
"@babel/plugin-transform-runtime": "^7.6.2",
|
||||
"@babel/preset-env": "^7.6.3",
|
||||
"autoprefixer": "^9.7.0",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user