Skip to content

Commit

Permalink
update babel-plugin-module-resolver in babel config package (#57)
Browse files Browse the repository at this point in the history
* update babel-plugin-module-resolver in babel config package

* add back comment
  • Loading branch information
stoikerty authored Feb 26, 2018
1 parent b809ade commit db7151c
Show file tree
Hide file tree
Showing 14 changed files with 17,687 additions and 275 deletions.
6 changes: 5 additions & 1 deletion src/packages/babel-preset-dev-toolkit/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'use strict';
const path = require('path');

// Warn Users to make sure we don't have an invalid `NODE_ENV`
var env = process.env.BABEL_ENV || process.env.NODE_ENV;
Expand Down Expand Up @@ -31,7 +32,10 @@ module.exports = {
require.resolve('babel-plugin-module-resolver'),
{
// using `process.cwd` makes it also work with `import()`
root: [process.cwd()],
root: ['./src'],
alias: {
src: path.resolve(process.cwd(), 'src'),
},
},
],
],
Expand Down
2 changes: 1 addition & 1 deletion src/packages/babel-preset-dev-toolkit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel-preset-dev-toolkit",
"version": "1.0.0",
"version": "1.0.1",
"description": "Uses create-react-app default, adds sane if-statements & root-relative imports",
"main": "index.js",
"scripts": {
Expand Down
Loading

0 comments on commit db7151c

Please sign in to comment.