Skip to content

Commit

Permalink
fix(@angular/cli): enable full node module resolution for project deps (
Browse files Browse the repository at this point in the history
  • Loading branch information
clydin authored and dond2clouds committed Apr 23, 2018
1 parent 989e71e commit 6b7c7c3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@angular/cli/models/webpack-configs/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export function getCommonConfig(wco: WebpackConfigOptions) {
devtool: buildOptions.sourcemaps ? 'source-map' : false,
resolve: {
extensions: ['.ts', '.js'],
modules: [nodeModules],
modules: ['node_modules', nodeModules],
},
resolveLoader: {
modules: [nodeModules]
Expand Down
13 changes: 13 additions & 0 deletions tests/e2e/tests/misc/module-resolution.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { appendToFile, prependToFile } from '../../utils/fs';
import { ng, silentNpm } from '../../utils/process';


export default async function () {
await silentNpm('install', 'firebase@3.7.8');

await prependToFile('src/app/app.module.ts', 'import * as firebase from \'firebase\';');
await appendToFile('src/app/app.module.ts', 'firebase.initializeApp({});');

await ng('build');
await ng('build', '--aot');
}

0 comments on commit 6b7c7c3

Please sign in to comment.