Skip to content

Instantly share code, notes, and snippets.

@tracker1
Last active August 10, 2017 20:44
Show Gist options
  • Save tracker1/8fabd36eefa88f8bb3966ddb4989e101 to your computer and use it in GitHub Desktop.
Save tracker1/8fabd36eefa88f8bb3966ddb4989e101 to your computer and use it in GitHub Desktop.
babel plugins for node 8.x + stage-2
{
"presets": [
[
"env",
{
"loose": true,
"targets": {
"node": "6.10.3"
}
}
]
],
"plugins": [
"syntax-dynamic-import",
"syntax-object-rest-spread",
"syntax-async-generators",
"transform-class-properties",
"transform-decorators-legacy",
"transform-object-rest-spread",
"transform-async-to-generator"
]
}
{
"devDependencies": {
...
"babel-plugin-syntax-async-generators": "^6.13.0",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-syntax-object-rest-spread": "^6.13.0",
"babel-plugin-transform-async-to-generator": "^6.24.1",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-object-rest-spread": "^6.23.0",
"babel-preset-env": "^1.4.0",
...
},
...
}
{
"presets": [
[
"env",
{
"loose": true,
"targets": {
"node": "current"
}
}
]
],
"plugins": [
"syntax-dynamic-import",
"syntax-object-rest-spread",
"transform-class-properties",
"transform-decorators-legacy",
"transform-object-rest-spread",
"transform-imports"
],
"env": {
"test": {
"plugins": ["istanbul", "rewire"], // optional - for testing
"sourceMaps": true,
"retainLines": true
}
}
}
{
...
"devDependencies": {
...
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-syntax-object-rest-spread": "^6.13.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-imports": "^1.4.0",
"babel-plugin-transform-object-rest-spread": "^6.23.0",
"babel-preset-env": "^1.6.0",
...
// optional - for testing
"babel-plugin-istanbul": "^3.1.2",
"babel-plugin-rewire": "^1.0.0",
"babel-register": "^6.24.1",
...
},
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment