运行ng服务时,文件存储在哪里? [英] Where are files stored when running ng serve?

查看:90
本文介绍了运行ng服务时,文件存储在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行ng serve时,文件在哪里生成和存储?我需要解决为什么该应用程序可以与ng serve一起使用但不能用于生产版本的问题.

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.

忘了说我正在使用webpack版本的angular-cli.

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

推荐答案

对于webpack版本,输出不会写入磁盘. Webpack管理所有内存,并使用webpack-dev-server将其提供给浏览器.

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.

如果要查看开发输出,则需要运行ng build,然后查看dist目录

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

这篇关于运行ng服务时,文件存储在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆