lmeijdam/angular-umd-dynamic-example

it can't run in production mode.

jol5 opened this issue · 7 comments

jol5 commented

image
I haven't made any changes. just running in ng serve --prod .

Can you try

ng serve --prod --optimization=false

With ng build --prod, I had to use --build-optimizer=false

Optimization breaks a link somewhere...

jol5 commented

thanks!!! this.compiler.compileModuleAndAllComponentsAsync( >>>this code will load all component of my dependence over the --prod 。so, it will be slow at first time .
image

you did solve it by not changing any code or?
original code;
return this.compiler.compileModuleAndAllComponentsAsync(module[${moduleInfo.moduleName}]).then(compiled => {

jol5 commented

you did solve it by not changing any code or?
original code;
return this.compiler.compileModuleAndAllComponentsAsync(module[${moduleInfo.moduleName}]).then(compiled => {

yes!

any chance of sharing what you changed? ;)

jol5 commented

any chance of sharing what you changed? ;)
nothing change;

Okay I will close this issue! 👍