Skip to content

Commit

Permalink
Merge pull request #8 from electrode/chore-fixTestConfigForDevDeps
Browse files Browse the repository at this point in the history
Fix webpack.test to resolve to arch-dev
  • Loading branch information
Charles Adams - cadam20 authored and Charles Adams - cadam20 committed Dec 15, 2015
2 parents adb9d53 + eeacf8f commit 0eba3e5
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ var path = require("path");
var _ = require("lodash");
var prodCfg = require("./webpack.config");

// Get Paths to give node_modules by resolving based on assumed presence of
// `package.json`.
var _archNodeModules = function (arch) {
var archDir = path.dirname(require.resolve(path.join(arch, "package.json")));
return path.join(archDir, "node_modules");
};

module.exports = {
cache: true,
context: path.join(process.cwd(), "test/client"),
Expand All @@ -19,7 +26,12 @@ module.exports = {
alias: {
// Allow root import of `src/FOO` from ROOT/src.
src: path.join(process.cwd(), "src")
}
},
modulesDirectories: [
"node_modules",
_archNodeModules("@walmart/electrode-archetype-react-component"),
_archNodeModules("@walmart/electrode-archetype-react-component-dev")
]
}),
resolveLoader: prodCfg.resolveLoader,
module: prodCfg.module,
Expand Down

0 comments on commit 0eba3e5

Please sign in to comment.