Skip to content

Commit 2af6d16

Browse files
committed
Do not add the lazy routes to the entry points.
1 parent ba7531a commit 2af6d16

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

addon/ng2/models/webpack-build-common.ts

+4-5
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ export function getWebpackCommonConfig(projectRoot: string, sourceDir: string) {
1111
const sourceRoot = path.resolve(projectRoot, `./${sourceDir}`);
1212

1313
const lazyModules = findLazyModules(path.resolve(projectRoot, sourceDir));
14-
const entries = Object.assign({
15-
main: [path.join(sourceRoot, 'main.ts')],
16-
polyfills: path.join(sourceRoot, 'polyfills.ts')
17-
}, lazyModules);
1814

1915

2016
return {
@@ -24,7 +20,10 @@ export function getWebpackCommonConfig(projectRoot: string, sourceDir: string) {
2420
root: path.resolve(projectRoot, `./${sourceDir}`)
2521
},
2622
context: path.resolve(__dirname, './'),
27-
entry: entries,
23+
entry: {
24+
main: [path.join(sourceRoot, 'main.ts')],
25+
polyfills: path.join(sourceRoot, 'polyfills.ts')
26+
},
2827
output: {
2928
path: path.resolve(projectRoot, './dist'),
3029
filename: '[name].bundle.js'

0 commit comments

Comments
 (0)