Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

it can't run in production mode. #8

Closed
jol5 opened this issue Feb 28, 2019 · 7 comments
Closed

it can't run in production mode. #8

jol5 opened this issue Feb 28, 2019 · 7 comments

Comments

@jol5
Copy link

jol5 commented Feb 28, 2019

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

@LeoLetourneur
Copy link

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
Copy link
Author

jol5 commented Feb 28, 2019

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

@lmeijdam
Copy link
Owner

lmeijdam commented Mar 1, 2019

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

@jol5
Copy link
Author

jol5 commented Mar 1, 2019

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

yes!

@lmeijdam
Copy link
Owner

lmeijdam commented Mar 3, 2019

any chance of sharing what you changed? ;)

@jol5
Copy link
Author

jol5 commented Mar 8, 2019

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

@lmeijdam
Copy link
Owner

Okay I will close this issue! 👍

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

No branches or pull requests

3 participants