You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/NationalBankBelgium/stark/blob/master/CONTRIBUTING.md#got-a-question-or-problem
Current behavior
When running the production build of an app that uses the bootstrap main class from stark-core implemented in #486 , Angular fails to enable the "production mode":
Error: Cannot enable prod mode after platform setup.
at An (application_ref.ts:48)
at decorateModule (abstract-stark-main.ts:140)
at e.invoke (zone.js.pre-build-optimizer.js:388)
at t.run (zone.js.pre-build-optimizer.js:138)
at zone.js.pre-build-optimizer.js:872
at e.invokeTask (zone.js.pre-build-optimizer.js:421)
at t.runTask (zone.js.pre-build-optimizer.js:188)
at m (zone.js.pre-build-optimizer.js:595)
at t.invokeTask [as invoke] (zone.js.pre-build-optimizer.js:500)
at _ (zone.js.pre-build-optimizer.js:1540)
Expected behavior
The Angular production mode should be correctly enabled in the production build of the application.
Minimal reproduction of the problem with instructions
Use the bootstrap logic provided by stark-core in your main.browser.ts like this:
classMainextendsAbstractStarkMain{publicconstructor(env: StarkEnvironment){super(env);}publicmain=(): Promise<any>=>{console.log("Bootstrapping the App");// Bootstrap our Angular app with a top level NgModulereturn(platformBrowserDynamic().bootstrapModule(AppModule)// the line below adapts the module depending on the environment// if you don't like what stark does by default, you can instead do your own customizations through the environment.* files// and use environment.customizeAppModule instead.then(this.decorateModule));};}newMain(environment).bootstrap();
Create the production build of the app and serve the application by running these commands
npm run build:prod
npm run server:prod
Open the app in the browser and check the console.
The text was updated successfully, but these errors were encountered:
I'm submitting a...
Current behavior
When running the production build of an app that uses the bootstrap main class from stark-core implemented in #486 , Angular fails to enable the "production mode":
Expected behavior
The Angular production mode should be correctly enabled in the production build of the application.
Minimal reproduction of the problem with instructions
Use the bootstrap logic provided by stark-core in your
main.browser.ts
like this:Create the production build of the app and serve the application by running these commands
npm run build:prod
npm run server:prod
Open the app in the browser and check the console.
The text was updated successfully, but these errors were encountered: