我在 Angular 8 中有一个项目。自从我的 main.js 文件是正常构建后尺寸会很大。运行后ng build --prod
。我得到以下一组 dist 文件。
文件浏览器视图
现在,通常为了在 IIS 中部署它,我只是从我当前的本地 dist 文件夹进行简单的复制粘贴到服务器中 IIS 指向的我的 web 文件夹。但是当我尝试做同样的事情时,我的浏览器仍在加载 main.js 文件而不是压缩的 main.js.br 文件。
任何人都可以帮助我解决我在部署时在这里缺少的东西。
注意:到目前为止,我还没有对我的 IIS 进行任何更改