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

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

问题描述

当我运行 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.

忘记提及我使用的是 angular-cli 的 webpack 版本.

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 serve 时文件存储在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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