mirror of
https://github.com/abhijithvijayan/web-extension-starter.git
synced 2026-01-30 09:48:12 +01: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": [
|
"presets": [
|
||||||
[
|
[
|
||||||
|
// Latest stable ECMAScript features
|
||||||
"@babel/preset-env",
|
"@babel/preset-env",
|
||||||
{
|
{
|
||||||
"targets": {
|
"targets": {
|
||||||
@ -12,9 +13,15 @@
|
|||||||
]
|
]
|
||||||
],
|
],
|
||||||
"plugins": [
|
"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",
|
"@babel/plugin-transform-runtime",
|
||||||
{
|
{
|
||||||
|
"helpers": false,
|
||||||
"regenerator": true
|
"regenerator": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -20,6 +20,8 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.6.4",
|
"@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/plugin-transform-runtime": "^7.6.2",
|
||||||
"@babel/preset-env": "^7.6.3",
|
"@babel/preset-env": "^7.6.3",
|
||||||
"autoprefixer": "^9.7.0",
|
"autoprefixer": "^9.7.0",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user