Skip to content

Commit

Permalink
feat(babel): Add module directory resolution to babel (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcompiles committed Jun 30, 2017
1 parent e9d58cf commit 3686eda
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion config/babel/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ module.exports = ({ webpack }) => {
const es2015Options = webpack ? { modules: false } : {};
const plugins = [
require.resolve('babel-plugin-transform-class-properties'),
require.resolve('babel-plugin-transform-object-rest-spread')
require.resolve('babel-plugin-transform-object-rest-spread'),
[
require.resolve('babel-plugin-module-resolver'),
{
root: [process.cwd()]
}
]
];

if (webpack) {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"babel-core": "^6.22.1",
"babel-jest": "^18.0.0",
"babel-loader": "^6.2.10",
"babel-plugin-module-resolver": "^2.7.1",
"babel-plugin-transform-class-properties": "^6.22.0",
"babel-plugin-transform-imports": "^1.1.0",
"babel-plugin-transform-object-rest-spread": "^6.22.0",
Expand Down

0 comments on commit 3686eda

Please sign in to comment.