Permalink
Browse files

Add appSrc to Webpack resolution to enable imports relative to `src/`

  • Loading branch information...
aaccurso committed Jun 1, 2017
1 parent a2b0979 commit f31e9c8db2988e8722396ceabc22012f51c0d19a
@@ -86,7 +86,8 @@ module.exports = {
// We placed these paths second because we want `node_modules` to "win"
// if there are any conflicts. This matches Node resolution mechanism.
// https://github.com/facebookincubator/create-react-app/issues/253
modules: ['node_modules', paths.appNodeModules].concat(
// Also we added appSrc to enable imports relative to `src/`.
modules: ['node_modules', paths.appNodeModules, paths.appSrc].concat(
// It is guaranteed to exist because we tweak it in `env.js`
process.env.NODE_PATH.split(path.delimiter).filter(Boolean)
),
@@ -84,7 +84,8 @@ module.exports = {
// We placed these paths second because we want `node_modules` to "win"
// if there are any conflicts. This matches Node resolution mechanism.
// https://github.com/facebookincubator/create-react-app/issues/253
modules: ['node_modules', paths.appNodeModules].concat(
// Also we added appSrc to enable imports relative to `src/`.
modules: ['node_modules', paths.appNodeModules, paths.appSrc].concat(
// It is guaranteed to exist because we tweak it in `env.js`
process.env.NODE_PATH.split(path.delimiter).filter(Boolean)
),

0 comments on commit f31e9c8

Please sign in to comment.