Where are files stored when running ng serve?

2019-04-04 04:06发布

问题:

When I run ng serve, where are the files generated and stored? I need to troubleshoot why the app works with ng serve but not for production build.

Forgot to mention that I'm using webpack version of angular-cli.

回答1:

With the webpack version the output isn't written to disk. Webpack manages that all in memory and serves it to the browser using the webpack-dev-server.

If you'd like to view the dev output, you will need to run ng build and then look into the dist directory