Reputation: 63
When running ng build --prod
angular creates the minified scripts for production.
The thing is on the generated mainjs file on the last lines it creates something like this:
module.exports = __webpack_require__(/*! C:\MyProject\src\main.ts */"./src/main.ts");
My problem is that our security team flags the C:\MyProject\src
as a vulnerability.
Besides removing this manually, is there any way to configure not to include this on the build?
Upvotes: 1
Views: 770
Reputation: 63
It seems that in the angular.json
file the optimization is false on my end.
I was able to minify and remove all the comments on the production build.
"production": {
"optimization": true
}
Upvotes: 1