angular - how to hide the folder path from webpack require() in Angular
问题描述
like this one: (its all over the debug console of the webpage)
__webpack_require__("../../../../../src/app/error/error.component.ts");
I don't want the users to see the folder structure of the app, Is there a way to hide those folder paths?
解决方案
The short answer: I had to build the Angular project with this command:
ng build --prod --aot=true
setting the prod to true and AOT to true (Ahead of time compilation) fixed the problem and the files are generated to full js and their name and folder paths are hidden completely
推荐阅读
- puppeteer - Puppeteer 在错误的选项卡中找到元素
- angular - 获取 Array 中值的 SUM
- linux - GStreamer decodebin 没有选择我的插件
- shell - 从shell中的文件名中提取时间戳部分
- reactjs - ReactJS - 为什么表单元素返回 null?
- node.js - Soap 请求:TypeError:无法使用“in”运算符在 svcutil.exe 中搜索“A”
- php - 将复选框值传递给 laravel 控制器以进行删除
- java - 更改 JTabbedPane 中选定选项卡的背景颜色
- excel - VBA 中的 getElementsByClassName 产生错误:对象不支持此属性或方法
- reactjs - Material UI 组件在 react-frame-component 中丢失了样式