@virket/website-core
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

Virket's Website core module

Module that implements

  • Types (interfaces)
  • Model
  • Repository
  • Service
  • State management (actions, effects, reducers, selectors)

Using your module in an Ionic 5 app

import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
...

// Import the module
import { WebsiteCoreModule } from '@virket/website-core/dist/src';

@NgModule({
  declarations: [AppComponent],
  entryComponents: [],
  imports: [
    ...
    StoreModule.forRoot({}),
    EffectsModule.forRoot([]),
    ...
    WebsiteCoreModule.forRoot({
      apiUrl: environment.apiUrl,
      instanceName: environment.instanceName
    }),
    ...
  ],
  providers: [
    ...
  ],
  bootstrap: [AppComponent]
})
export class AppModule {}

Build npm module errors

error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class

Method 1

  • first run: npx ngcc && ngcc -s dist
  • then npm run build

Method 2: disable ivy in tsconfig.ts

  • set in tsconfig.ts
angularCompilerOptions {
  ...
  "enableIvy": false
  ...
}

Package Sidebar

Install

npm i @virket/website-core

Weekly Downloads

1

Version

1.1.1

License

MIT

Unpacked Size

112 kB

Total Files

66

Last publish

Collaborators

  • kingandrew
  • nandyx