26

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.

Sam
  • 1,238
  • 1
  • 13
  • 22

1 Answers1

26

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

Brocco
  • 58,400
  • 10
  • 68
  • 76
  • 1
    I think running `ng serve` serves some HTML files directly from my project folder because I notice that `ng build` doesn't include those HTML files I need in the dist folder. Those HTML files are my imports for the Polymer components. It works fine with `ng serve`. – Sam Aug 31 '16 at 19:32
  • Can I customize `ng serve` command? I mean I want to run some bash commands say `node abc.js` before every `ng serve` is it possible? – Pardeep Jain Aug 08 '19 at 11:59
  • can anyone explain which memory? Like there is a tons of memories. Is it RAM? Is it GPU cache? Is it disk memory? If I have 1G Ram memory, how does it manage? Excuse me please, I am this dumb. Help! – Adam Bajger Feb 20 '20 at 21:10
  • 1
    @AdamBajger when anyone says "memory" it's often RAM, specially in programming. – Wiley Marques Apr 20 '20 at 12:04
  • 1
    @WileyMarques apparently it's virtual address space: https://stackoverflow.com/a/20686868/2063755 – David Klempfner Apr 14 '21 at 22:50