static-cms/.babelrc
Caleb f97e2d2853 Fix build for Gatsby (WebPack v1).
WebPack version 1, which Gatsby is using, has the Acorn parser set to
parse ES6 and lower. The latest version of WebPack supports parsing up
to ES2017 and lower (webpack/lib/Parser.js), but Gatsby isn't using it.
2018-02-21 16:31:21 -05:00

75 lines
1.6 KiB
Plaintext

{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": [
"last 2 Chrome versions",
"last 2 Opera versions",
"last 2 Firefox versions",
"last 2 Edge versions",
"last 2 Safari versions",
"last 2 iOS versions",
"last 2 ChromeAndroid versions"
]
}
}],
"react",
/**
* Support WebPack version 1.
*/
"es2016",
"es2017",
],
"plugins": [
"lodash",
["babel-plugin-transform-builtin-extend", {
"globals": ["Error"]
}],
["transform-runtime", {
"useBuiltIns": true,
"useESModules": true
}],
["module-resolver", {
/**
* Use aliases to avoid relative path import hell.
*/
"root": [
/**
* Components
*/
"./src/components"
],
"alias": {
/**
* Top level src directories
*/
"Actions": "./src/actions/",
"Backends": "./src/backends/",
"Constants": "./src/constants/",
"Formats": "./src/formats/",
"Integrations": "./src/integrations/",
"Lib": "./src/lib/",
"Reducers": "./src/reducers/",
"Redux": "./src/redux/",
"Routing": "./src/routing/",
"ValueObjects": "./src/valueObjects/",
}
}],
"transform-export-extensions",
"transform-class-properties",
"transform-object-rest-spread",
],
"env": {
"test": {
"presets": [
["env", {
"targets": {
"node": "6"
}
}]
]
}
}
}