Open shyamal890 opened 6 years ago
Hi any updates on this?
@shyamal890 Nope so far. I think that today I will find a little bit of time to take a look at this.
Ok so I was able to solve the issues. Listing out the changes that solved the issue:
main.ts
mainly for hmr. So after including ng-toolkit, I needed to change AppModule
to AppBrowserModule
.const bootstrap = () => platformBrowserDynamic().bootstrapModule(AppModule); <-- CHANGED THIS
if (environment.hmr) {
var module: {};
if (module[ 'hot' ]) {
hmrBootstrap(module, bootstrap);
} else {
console.error('HMR is not enabled for webpack-dev-server!');
console.log('Are you using the --hmr flag for ng serve?');
}
} else {
bootstrap();
}
Had to comment out "baseUrl": "./",
in tsconfig.server.json
as it was giving path errors otherwise. Still don't know why it didn't work properly.
There is some issue when ng-toolkit
tries to wrap window
.
I'm submitting a...
In package
Current behavior
npm run hmr
ornpm run build:prod
.On running
npm run build:prod
. It gives error saying component modules cannot be found at their respective location. Whilenpm run hmr
gives error saying BrowserPlatform is neededExpected behavior
Minimal reproduction of the problem with instructions
Adding a zip file with the repository.
Environment
for test.zip