更新时间:2023-10-25 23:23:52
所以,我想如果我想静态地提供这些文件而不在页面前面使用某种服务器,我必须设置构建参数 --base-href ./
并且还使用图像等资产的相对路径.
So, I figured out that if I want to serve this files statically without using some sort of server in front of the page, I have to set build parameter --base-href ./
and also use relative paths for the assets like images.
所以构建命令实际上是
ng build --prod --aot --service-worker --base-href ./