Resolve module aliases in Babel.

If we only resolve them in WebPack the tests will not work.
This commit is contained in:
Caleb
2017-12-08 09:53:28 -07:00
committed by Shawn Erquhart
parent 1590eff831
commit e2125c3555
4 changed files with 55 additions and 38 deletions

View File

@ -14,6 +14,32 @@
["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/",
}
}]
],
"env": {