Skip to content

Commit

Permalink
fix(webpack): remove usage of __dirname from the config. (#3422)
Browse files Browse the repository at this point in the history
  • Loading branch information
hansl committed Dec 6, 2016
1 parent e6364a9 commit 8597786
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions packages/angular-cli/models/webpack-build-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,12 @@ export function getWebpackCommonConfig(
devtool: sourcemap ? 'source-map' : false,
resolve: {
extensions: ['.ts', '.js'],
modules: [nodeModules]
modules: [nodeModules],
},
context: path.resolve(__dirname, './'),
resolveLoader: {
modules: [path.resolve(projectRoot, 'node_modules')]
},
context: projectRoot,
entry: entry,
output: {
path: path.resolve(projectRoot, appConfig.outDir),
Expand Down
2 changes: 1 addition & 1 deletion packages/angular-cli/models/webpack-build-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const getWebpackTestConfig = function (projectRoot, environment, appConfig, test

return {
devtool: testConfig.sourcemap ? 'inline-source-map' : 'eval',
context: path.resolve(__dirname, './'),
context: projectRoot,
resolve: {
extensions: ['.ts', '.js'],
plugins: [
Expand Down

0 comments on commit 8597786

Please sign in to comment.