Skip to content

Commit b4c3202

Browse files
committed
revert: fix(@ngtools/webpack): output consistent filename
This reverts commit df172bd.
1 parent f848d08 commit b4c3202

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ describe('Browser Builder lazy modules', () => {
142142
tap((buildEvent) => expect(buildEvent.success).toBe(true)),
143143
tap(() => {
144144
expect(host.scopedSync()
145-
.exists(join(outputPath, 'lazy-lazy-module.js'))).toBe(true);
145+
.exists(join(outputPath, 'lazy-lazy-module-ngfactory.js'))).toBe(true);
146146
}),
147147
).toPromise().then(done, done.fail);
148148
});
@@ -301,7 +301,7 @@ describe('Browser Builder lazy modules', () => {
301301
runTargetSpec(host, browserTargetSpec, overrides, DefaultTimeout * 2).pipe(
302302
tap((buildEvent) => expect(buildEvent.success).toBe(true)),
303303
tap(() => expect(host.scopedSync()
304-
.exists(join(outputPath, 'src-app-lazy-lazy-module.js')))
304+
.exists(join(outputPath, 'src-app-lazy-lazy-module-ngfactory.js')))
305305
.toBe(true)),
306306
).toPromise().then(done, done.fail);
307307
});

packages/ngtools/webpack/src/angular_compiler_plugin.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ export class AngularCompilerPlugin {
698698
const modulePath = this._lazyRoutes[key];
699699
const importPath = key.split('#')[0];
700700
if (modulePath !== null) {
701-
const name = importPath.replace(/(\.ngfactory)?(\.(js|ts))?$/, '');
701+
const name = importPath.replace(/(\.ngfactory)?\.(js|ts)$/, '');
702702

703703
return new this._contextElementDependencyConstructor(modulePath, name);
704704
} else {

0 commit comments

Comments
 (0)