Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AOT build produces applications unable to lazy load modules #2452

Closed
slmyers opened this issue Sep 30, 2016 · 54 comments · Fixed by #2992
Closed

AOT build produces applications unable to lazy load modules #2452

slmyers opened this issue Sep 30, 2016 · 54 comments · Fixed by #2992
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful type: bug/fix

Comments

@slmyers
Copy link

slmyers commented Sep 30, 2016

angular-cli: 1.0.0-beta.16
node: 6.0.0
os: linux x64

reproduction repo can be found here

The log given by the failure.

main.cfeed71….bundle.js:547 EXCEPTION: Uncaught (in promise): Error: Cannot find module 
'app/lazy/lazy.module.ngfactory'.

It seems that aot option can not build project that lazily loads modules. I would hope that one could use the patterns in the official documentation -- which I believe I'm doing -- and use the -- aot option to compile your app easily. I would appreciate any clarification as to whether this is an issue with the CLI or with the compiler. Thanks.

@slmyers
Copy link
Author

slmyers commented Oct 2, 2016

###update

I think the LazyModule may not have been compiled, because there is a 0.map but no 0.chunk.js in the dist folder.

lazy_no_chunk

@Delagen
Copy link

Delagen commented Oct 4, 2016

#2112 seems aot process does not polished.
I issue No module factory available for dependency type: ContextElementDependency for lazyRoutes dependencies

@coryrylan
Copy link
Contributor

coryrylan commented Oct 5, 2016

I have this same issue as well. I dont have a repo to show yet but I get the same error as above.
I ran ng build --prod --aot. Also one thing to note my outDir is set to dist/build instead of the default path.

angular-cli: 1.0.0-beta.16
node: 6.4.0
os: win32 x64
main.166efb8….bundle.js:1494 Unhandled Promise rejection: Cannot find module 'app/account/account.module.ngfactory'. ; Zone: angular ; Task: Promise.then ; Value: Error: Cannot find module 'app/account/account.module.ngfactory'.(…) Error: Cannot find module 'app/account/account.module.ngfactory'.

@achimha
Copy link

achimha commented Oct 6, 2016

I have the same problem and also don't see compiled code for the lazy modules, only the .ngfactory.ts file.

@filipesilva
Copy link
Contributor

In beta.16 the --aot flag was still experimental. Can you repro in beta.17?

@filipesilva filipesilva added the needs: more info Reporter must clarify the issue label Oct 9, 2016
@Delagen
Copy link

Delagen commented Oct 10, 2016

@filipesilva the same error. No changes in the main function in beta16->beta17 upgrade as I specified in #2112 (comment)
You can get source from @tianyangj comment
The only changes is NgcWebpackPlugin -> AotPlugin rename and some cleanup in plugin arguments.

@achimha
Copy link

achimha commented Oct 10, 2016

With b17 I still don't get the lazy route modules compiled by ng build --prod --aot. There isn't even an ngfactory file, just a main bundle. For some reason the loadChildren does not trigger the compilation.

I have a file app/src/lazy/lazy.routes.ts:

export const lazyRoutes: Routes = [
    {
        path: 'signup',
        loadChildren: 'app/lazy/signup/signup.module#SignupModule'
    }
];

This route definition is part of the main route definition in app/app-routing.module.ts:

const routes: Routes = [
    {
        path: '',
        component: FrontpageComponent
    },
    {
        path: 'login',
        component: LoginComponent
    },
    ...lazyRoutes,
    {
        path: '**',
        component: NotFoundComponent
    },
];

@NgModule({
    imports: [RouterModule.forRoot(routes)],
    exports: [RouterModule],
    providers: []
})
export class FrontendRoutingModule {
}

I tried changing the loadChildren paths to be relative but then the JIT version throws as well, it has to start with app/.

@filipesilva filipesilva added feature: aot type: bug/fix P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful and removed needs: more info Reporter must clarify the issue labels Oct 10, 2016
@tomwanzek
Copy link

Just tested a project with beta.17. Build/serve without --aot work without issues w.r.t. lazy-loading, regardless of whether prod is used or not.

When I use ng serve --aot:
Upon initial load the error message below appears in chrome debugger:
error_1

While the initial screens seem to work regardless, hitting the lazy-loaded route throws an error, because the module ngFactory cannot be found.

One additional note, when I build with --aot the code chunk is not generated for the lazy route in the dist folder, however, there is a map file which seems to correspond to it.

@mattlewis92
Copy link
Contributor

This error is also present in the demo app - webpack builds the project ok, but as soon as you click the lazy link, this error is thrown:

Uncaught (in promise): Error: Cannot find module './lazy.module.ngfactory'.

@drejohnson
Copy link

drejohnson commented Oct 11, 2016

I get the error HomeModule is not an NgModule when using ng build --prod --aot on beta.17. Using just ng build --prod works fine.

home.module.ts

const HomeRoutes: Routes = [
  {
    path: '',
    component: HomeComponent,
    pathMatch: 'full'
  }
];

@NgModule({
  imports: [
    CommonModule,
    RouterModule.forChild(HomeRoutes)
  ],
  declarations: [HomeComponent]
})
export class HomeModule { }

app.module.ts

export const Routes = [
  { path: '', redirectTo: 'home', pathMatch: 'full' },
  { path: 'home', loadChildren: 'app/home/home.module#HomeModule' },
  { path: 'about', loadChildren: 'app/about/about.module#AboutModule' }
];

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule,
    RouterModule.forRoot(Routes)
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

@Rosseyn
Copy link

Rosseyn commented Oct 14, 2016

Using lazy routes, v1.0.0-beta-16 wouldn't let me compile, but beta-17 completed successfully.
I'm able to serve dev with great improvement in speed, but can't ng serve --prod --aot after ng build --prod --aot and still have the app fully load. Currently it only loads as far as the initial Loading... splash, and doesn't go any further, no errors in console.

@tony-fanbeat
Copy link

Any updates on this issue?

We have a large app that was originally written against beta-17. I recently moved it over to the Angular2 release and hooked up the ng compiler to take advantage of AoT compilation, but as of now I haven't found a way to leverage both AoT and lazy loading. As mentioned above, it will compile fine but when navigating to the lazy route it throws an error that 'lazy.module.ngfactory' could not be found

AoT is a killer feature and made a noticeable difference in our boot time, but at this point our --prod build still send down ~2.2mb all at once and we would love to cut that down by lazy loading some of our lesser-used routes

@NgxDev
Copy link

NgxDev commented Oct 21, 2016

Same thing here, as @drejohnson is experiencing...

ng build --aot fails with: "LazyModule is not an NgModule"

Created an app with ng new and then just added a lazy loaded module: https://github.com/MrCroft/lazy

ng build --aot fails with: "LazyModule is not an NgModule" if I don't use export default in the lazy module, or it fails with "can't find symbol LazyModule exported from module D:/wamp/www/lazy/src/app/lazy/lazy.module.ts" if I do have export default

angular-cli: 1.0.0-beta.18
Angular: 2.1.0
node: 6.9.1
os: win32 x64

@tomwanzek
Copy link

I just upgraded the project I tested with beta.17 to beta.18. As mentioned above, I am encountering the same failure modes:

  • project build and serve are fine without --aot (regardless of dev or prod)
  • project compiles without errors with --aot. However, the chunks for the lazy modules are not emitted in js. There is, oddly enough, again a partial 0.map without any corresponding js file.

@naveedahmed1
Copy link

Any update on this?

@NgxDev
Copy link

NgxDev commented Oct 28, 2016

Very strange... I've just tried ng build --aot with cli beta.18 on the last 3 releases of Angular:
With Angular 2.1.0 I get: Cannot read property 'parse' of undefined
With Angular 2.1.1 I get: this.compiler.compileModules is not a function
With Angular 2.1.2 I get: Cannot read property 'transitiveModules' of undefined

This is unrelated to lazy loading (doesn't matter if I have a lazy module or not). Aot used to work just fine without lazy loading at least.
Just ng new and then:

  1. change angular version in package.json (strict version, no ~ or ^)
  2. delete node_modules/@angular
  3. npm cache clean (maybe not necessary, but it's kind of a reflex already)
  4. npm install
  5. ng build --aot

In fact, even on the same example I gave in my post above (https://github.com/MrCroft/lazy) with the same Angular version (2.1.0) and same node/cli versions, I don't get LazyModule is not an NgModule anymore :| I now get Cannot read property 'parse' of undefined. Without changing anything, except uninstalling/installing different versions of Angular before going back to 2.1.0 again (but removed node_modules/@angular and running npm cache clean every time).

angular-cli: 1.0.0-beta.18
node: 6.9.1
os: win32 x64

Full logs:
Angular 2.1.0:

D:\wamp\www\my-app> ng build --aot
can't resolve module @angular/core/src/di/opaque_token from D:\wamp\www\my-app\src\index.ts
Cannot read property 'parse' of undefined
TypeError: Cannot read property 'parse' of undefined
    at ReflectorHost.normalizeAssetUrl (D:\Users\iminar\Dev\angular\modules\@angular\compiler-cli\src\reflector_host.ts:70:28)
    at ReflectorHost.findDeclaration (D:\Users\iminar\Dev\angular\modules\@angular\compiler-cli\src\reflector_host.ts:175:27)
    at StaticReflector.initializeConversionMap (D:\Users\iminar\Dev\angular\modules\@angular\compiler-cli\src\static_reflector.ts:184:34)
    at new StaticReflector (D:\Users\iminar\Dev\angular\modules\@angular\compiler-cli\src\static_reflector.ts:72:57)
    at AotPlugin._setupOptions (D:\wamp\www\my-app\node_modules\@ngtools\webpack\src\plugin.js:122:27)
    at new AotPlugin (D:\wamp\www\my-app\node_modules\@ngtools\webpack\src\plugin.js:34:14)
    at Object.exports.getWebpackAotConfigPartial (D:\wamp\www\my-app\node_modules\angular-cli\models\webpack-build-typescript.js:57:13)
    at new NgCliWebpackConfig (D:\wamp\www\my-app\node_modules\angular-cli\models\webpack-config.js:18:42)
    at Class.run (D:\wamp\www\my-app\node_modules\angular-cli\tasks\build-webpack.js:17:22)
    at Class.run (D:\wamp\www\my-app\node_modules\angular-cli\commands\build.js:50:26)
    at Class.<anonymous> (D:\wamp\www\my-app\node_modules\angular-cli\lib\models\command.js:152:17)
    at tryCatch (D:\wamp\www\my-app\node_modules\rsvp\dist\lib\rsvp\-internal.js:215:12)
    at invokeCallback (D:\wamp\www\my-app\node_modules\rsvp\dist\lib\rsvp\-internal.js:230:13)
    at D:\wamp\www\my-app\node_modules\rsvp\dist\lib\rsvp\then.js:29:16
    at flush (D:\wamp\www\my-app\node_modules\rsvp\dist\lib\rsvp\asap.js:85:5)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)

Angular 2.1.1:

D:\wamp\www\my-app> ng build --aot
  0% compilingthis.compiler.compileModules is not a function
TypeError: this.compiler.compileModules is not a function
    at CodeGenerator.codegen (D:\Users\iminar\Dev\angular\modules\@angular\compiler-cli\src\codegen.ts:71:26)
    at AotPlugin._make (D:\wamp\www\my-app\node_modules\@ngtools\webpack\src\plugin.js:186:43)
    at Compiler.<anonymous> (D:\wamp\www\my-app\node_modules\@ngtools\webpack\src\plugin.js:151:75)
    at Compiler.applyPluginsParallel (D:\wamp\www\my-app\node_modules\tapable\lib\Tapable.js:156:14)
    at Compiler.<anonymous> (D:\wamp\www\my-app\node_modules\webpack\lib\Compiler.js:463:8)
    at Compiler.applyPluginsAsync (D:\wamp\www\my-app\node_modules\tapable\lib\Tapable.js:73:70)
    at Compiler.compile (D:\wamp\www\my-app\node_modules\webpack\lib\Compiler.js:456:7)
    at Compiler.<anonymous> (D:\wamp\www\my-app\node_modules\webpack\lib\Compiler.js:219:10)
    at Compiler.readRecords (D:\wamp\www\my-app\node_modules\webpack\lib\Compiler.js:367:10)
    at Compiler.<anonymous> (D:\wamp\www\my-app\node_modules\webpack\lib\Compiler.js:216:9)
    at next (D:\wamp\www\my-app\node_modules\tapable\lib\Tapable.js:81:11)
    at Compiler.<anonymous> (D:\wamp\www\my-app\node_modules\webpack\lib\CachePlugin.js:34:58)
    at Compiler.applyPluginsAsync (D:\wamp\www\my-app\node_modules\tapable\lib\Tapable.js:85:13)
    at Compiler.<anonymous> (D:\wamp\www\my-app\node_modules\webpack\lib\Compiler.js:213:8)
    at next (D:\wamp\www\my-app\node_modules\tapable\lib\Tapable.js:81:11)
    at Compiler.<anonymous> (D:\wamp\www\my-app\node_modules\webpack\lib\node\NodeEnvironmentPlugin.js:23:3)
    at Compiler.applyPluginsAsync (D:\wamp\www\my-app\node_modules\tapable\lib\Tapable.js:85:13)
    at Compiler.run (D:\wamp\www\my-app\node_modules\webpack\lib\Compiler.js:210:7)
    at D:\wamp\www\my-app\node_modules\angular-cli\tasks\build-webpack.js:26:29
    at Class.run (D:\wamp\www\my-app\node_modules\angular-cli\tasks\build-webpack.js:25:16)
    at Class.run (D:\wamp\www\my-app\node_modules\angular-cli\commands\build.js:50:26)
    at Class.<anonymous> (D:\wamp\www\my-app\node_modules\angular-cli\lib\models\command.js:152:17)
    at tryCatch (D:\wamp\www\my-app\node_modules\rsvp\dist\lib\rsvp\-internal.js:215:12)
    at invokeCallback (D:\wamp\www\my-app\node_modules\rsvp\dist\lib\rsvp\-internal.js:230:13)
    at D:\wamp\www\my-app\node_modules\rsvp\dist\lib\rsvp\then.js:29:16
    at flush (D:\wamp\www\my-app\node_modules\rsvp\dist\lib\rsvp\asap.js:85:5)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)

Angular 2.1.2:

D:\wamp\www\my-app> ng build --aot
  0% compilingCannot read property 'transitiveModules' of undefined
TypeError: Cannot read property 'transitiveModules' of undefined
    at D:\wamp\www\my-app\node_modules\@angular\compiler\bundles\compiler.umd.js:13042:22
    at Array.forEach (native)
    at analyzeNgModules (D:\wamp\www\my-app\node_modules\@angular\compiler\bundles\compiler.umd.js:13041:24)
    at OfflineCompiler.compileModules (D:\wamp\www\my-app\node_modules\@angular\compiler\bundles\compiler.umd.js:13115:20)
    at CodeGenerator.codegen (D:\Users\iminar\Dev\angular\modules\@angular\compiler-cli\src\codegen.ts:71:26)
    at AotPlugin._make (D:\wamp\www\my-app\node_modules\@ngtools\webpack\src\plugin.js:186:43)
    at Compiler.<anonymous> (D:\wamp\www\my-app\node_modules\@ngtools\webpack\src\plugin.js:151:75)
    at Compiler.applyPluginsParallel (D:\wamp\www\my-app\node_modules\tapable\lib\Tapable.js:156:14)
    at Compiler.<anonymous> (D:\wamp\www\my-app\node_modules\webpack\lib\Compiler.js:463:8)
    at Compiler.applyPluginsAsync (D:\wamp\www\my-app\node_modules\tapable\lib\Tapable.js:73:70)
    at Compiler.compile (D:\wamp\www\my-app\node_modules\webpack\lib\Compiler.js:456:7)
    at Compiler.<anonymous> (D:\wamp\www\my-app\node_modules\webpack\lib\Compiler.js:219:10)
    at Compiler.readRecords (D:\wamp\www\my-app\node_modules\webpack\lib\Compiler.js:367:10)
    at Compiler.<anonymous> (D:\wamp\www\my-app\node_modules\webpack\lib\Compiler.js:216:9)
    at next (D:\wamp\www\my-app\node_modules\tapable\lib\Tapable.js:81:11)
    at Compiler.<anonymous> (D:\wamp\www\my-app\node_modules\webpack\lib\CachePlugin.js:34:58)
    at Compiler.applyPluginsAsync (D:\wamp\www\my-app\node_modules\tapable\lib\Tapable.js:85:13)
    at Compiler.<anonymous> (D:\wamp\www\my-app\node_modules\webpack\lib\Compiler.js:213:8)
    at next (D:\wamp\www\my-app\node_modules\tapable\lib\Tapable.js:81:11)
    at Compiler.<anonymous> (D:\wamp\www\my-app\node_modules\webpack\lib\node\NodeEnvironmentPlugin.js:23:3)
    at Compiler.applyPluginsAsync (D:\wamp\www\my-app\node_modules\tapable\lib\Tapable.js:85:13)
    at Compiler.run (D:\wamp\www\my-app\node_modules\webpack\lib\Compiler.js:210:7)
    at D:\wamp\www\my-app\node_modules\angular-cli\tasks\build-webpack.js:26:29
    at Class.run (D:\wamp\www\my-app\node_modules\angular-cli\tasks\build-webpack.js:25:16)
    at Class.run (D:\wamp\www\my-app\node_modules\angular-cli\commands\build.js:50:26)
    at Class.<anonymous> (D:\wamp\www\my-app\node_modules\angular-cli\lib\models\command.js:152:17)
    at tryCatch (D:\wamp\www\my-app\node_modules\rsvp\dist\lib\rsvp\-internal.js:215:12)
    at invokeCallback (D:\wamp\www\my-app\node_modules\rsvp\dist\lib\rsvp\-internal.js:230:13)
    at D:\wamp\www\my-app\node_modules\rsvp\dist\lib\rsvp\then.js:29:16
    at flush (D:\wamp\www\my-app\node_modules\rsvp\dist\lib\rsvp\asap.js:85:5)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)

Not sure what's with that D:\Users\iminar path in each of the above logs :)

@Delagen
Copy link

Delagen commented Oct 28, 2016

@MrCroft transitiveModules is the options of codegen function, if options does not provided then it undefined and cause this error
source code from compiler-cli part
https://github.com/angular/angular/blob/master/modules/%40angular/compiler-cli/src/main.ts#L23

@NgxDev
Copy link

NgxDev commented Oct 28, 2016

@Delagen Nobody said anything about doing anything else other than pass the --aot flag.
Shouldn't ng new + ng build --aot simply just work?... Since I didn't do anything custom myself and there's no 3rd party involved or anything else... Just a minimum app, the one generated by the cli.

@sgybas
Copy link

sgybas commented Nov 1, 2016

I have created a new project using angular-cli beta.19-3 and just added a lazy route to reproduce the problem: https://github.com/sgybas/angular-cli-2452

ng serve works fine, ng serve --aot does not. The browser console shows
Error: Cannot find module './lazy/lazy.module.ngfactory'.

ng build --prod works fine, two bundles are created. ng build --prod --aot creates the main bundle but the second chunk is not created.

Is there anything I can do to help resolve the issue?

@jvitor83
Copy link

@MrCroft and @naveedahmed1, the key change was the

    "baseUrl": "",

inside the tsconfig.json.
The packages updates + this line solve the LazyModule is not an NgModule error at build.

@maxime1992
Copy link
Contributor

maxime1992 commented Nov 24, 2016

I can confirm that I've just upgraded to angular-cli 1.0.0-beta.21 and lazy loading is working with AOT <3 ! Big shout out for the team :) !!

@maxime1992
Copy link
Contributor

I found a problem when running --prod without --aot : Lazy loaded modules are no longer lazy loaded. Am I the only one to have that problem ? #3267

@tomwanzek
Copy link

@maxime1992 my lazy loading works fine with ng serve --prod with beta.21. Unfortunately, I can only partially validate with --aot. It compiles and serves the first lazy route without issues 😄 Then I run into the first @Effect custom decorator which is stripped out due to #2799 😢

Theory of Constraints in action 😉

@maxime1992
Copy link
Contributor

maxime1992 commented Nov 24, 2016

Hi @tomwanzek ! Today is your lucky day :)
I had exactly the same problem and I made a fork (like 5h ago) of angular-cli that doesn't strip out decorators! Just take a look at the end of #2799 ;) I tried it and it's working fine for me. I also added a bundle size comparison and it's way better than I could imagine. Only +7kb on main bundle. I thought keeping decorators would have a huge impact on bundle size but it's not that bad actually. Plus, I'll give a try to rollup now that AOT is working well and hopefully I'll get even better results!

@unsafecode
Copy link

HTH, I set up a demo repo to summarize how to make lazy routes work with @ngtools/webpack

https://github.com/unsafecode/ng2-aot

@born2net
Copy link

I am also getting the same error of:

Error: No module factory available for dependency type: ContextElementDependency

and also using lazy loaded modules...
any ideas?

angular-cli: 1.0.0-beta.26
node: 6.9.4
os: win32 x64
@angular/common: 2.4.5
@angular/compiler: 2.4.5
@angular/core: 2.4.5
@angular/forms: 2.4.5
@angular/http: 2.4.5
@angular/language-service: 2.4.5
@angular/platform-browser: 2.4.5
@angular/platform-browser-dynamic: 2.4.5
@angular/router: 3.2.1
@angular/compiler-cli: 2.4.5

Regards,

Checkout the Ultimate Angular 2 Boorstrap App: @ http://ng2.javascriptninja.io
Source@ https://github.com/born2net/ng2Boilerplate

@filipesilva
Copy link
Contributor

@born2net I haven't seen that ContextElementDependency error in a few months now, I didn't think we had it anymore.

Can you open a new issue with a repo I can debug in?

@born2net
Copy link

I cleared node_modules, rebuilt project and some clean ups and now gone, so ok so far
thanks,
Sean

MRHarrison pushed a commit to MRHarrison/angular-cli that referenced this issue Feb 9, 2017
…ngular#2992)

Before, we were using paths relative to base at all time, but these
might not be the paths we get in System.import(), therefore we have to
keep the relative path.

Also fix e2e tests.

BREAKING CHANGES: Using relative paths might lead to path clashing. We
now properly output an error in this case.

Fixes angular#2452
Fixes angular#2735
Fixes angular#2900
@imVinayPandya
Copy link

i have faced same issue but i solved it by doing following 2 things:

i have added ./ as prefix of html and css in every component file.

i am also using lazy loaded modules, so was exporting module class as default i removed default from
export default class AdminModule
and i have added

{ path: 'dashboard', loadChildren: 'app/admin/dashboard/dashboard.module#DashboardModule' },

and its working for me.

@IAMtheIAM
Copy link

No solution???

@Rosseyn
Copy link

Rosseyn commented Aug 9, 2017 via email

@wbhob
Copy link

wbhob commented Nov 1, 2017

I'm experiencing a regression with Angular 5.0.0-rc.9 and CLI v1.5.0-rc.8

@Rosseyn
Copy link

Rosseyn commented Nov 1, 2017 via email

@wbhob
Copy link

wbhob commented Nov 1, 2017

Woah what is that @Rosseyn I have never seen the moduleId thing

@Rosseyn
Copy link

Rosseyn commented Nov 1, 2017 via email

@andresmino
Copy link

Hi all! Do you have any update on this issue? I've tried all workaround suggested but none of those worked for me.

@wbhob
Copy link

wbhob commented Nov 3, 2017

In Angular v5, what I've found is you can't terminate the file name with .ts.

So if your RoutingModule is AuthRoutingModule in ./auth/auth-routing.module.ts, your loadChildren would be './auth/auth-routing.module#AuthRoutingModule.

@michaelkrone
Copy link

When updating to from Angular 4 to Angular 5 i kept getting

ERROR in Error: Could not resolve module [module path] relative to [routing module path]

for lazy loaded modules. Removing the .ts suffix as @wbhob suggested works.

@ctaepper
Copy link

@wbhob you are my hero! was that mentioned anywhere in breaking changes???

@NgxDev
Copy link

NgxDev commented Nov 24, 2017

I had no idea it ever worked with the extension. I've never put the extension, as far as I can remember (at least since they've moved the CLI to webpack, so way back before even ending v2 releases and moving to Angular v4 I think).
As for the "deprecation", I don't remember even seeing an example using the extension in the official docs, so there would be no deprecation to be mentioned.
But I could be wrong, if my memory isn't as good as I think it is.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.