dragonman117 commented on issue #8493: Angular 6 cannot compile with `ng serve 
--prod`
URL: 
https://github.com/apache/incubator-echarts/issues/8493#issuecomment-395873796
 
 
   I have the exact same issue,
   
   Angular 6 will use the echarts using the "@types/echarts" typings
   
   The issue comes from webpack optimization so as a temporary fix you can run 
`ng build --prod --build-optimizer=false` and the project will compile (though 
this is not ideal). 
   
   Upon further research, I discovered that the issue seems to stem from the 
version of webpack being used by the angular cli (with cli version 6.0 + uses 
webpack 4.8.3)
   
   > "Whenever you see Cannot read property 'afterCompile' of undefined it 
probably means ts-loader is dealing with webpack 3 not webpack 4." - 
johnnyreilly (https://github.com/TypeStrong/ts-loader/issues/729) 
   
   I'm still looking into the issue and trying to find a permanent fix but this 
is as far as I got so far.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to