Skip to content
This repository has been archived by the owner on Oct 29, 2023. It is now read-only.

Why build only NGXS (store, hmr) without router, logger, etc plugin? #688

Closed
splincode opened this issue Dec 13, 2019 · 3 comments
Closed

Comments

@splincode
Copy link
Contributor

image

@splincode
Copy link
Contributor Author

@mgechev Why import "@ngxs/router-plugin"?

image

Instead

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { NgxsRouterPluginModule } from '@ngxs/router-plugin';

import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    NgxsRouterPluginModule.forRoot() // <--- correct behavior
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

I have build error with Angular 9.rc-6

image

@splincode
Copy link
Contributor Author

angular/angular#34191

@mgechev
Copy link
Member

mgechev commented Dec 14, 2019

Some of the projects are still automatically generated. An import of the library is often good enough to trigger ngcc and verify it works, but as you noticed, not always. Would you open a PR?

Regarding your first question, we picked the top modules from npm, which have angular as a keyword. It looks like the algorithm did not choose all ngxs modules.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants