PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, July 13, 2022

[FIXED] How to prevent Angular/Webpack leaving references to dev directories on production code

 July 13, 2022     angular, web-deployment, webpack     No comments   

Issue

Angular/Webpack is leaving "comments" on production (dist folder) code referencing development directories which include my username.

Example:

  • main.js:

module.exports = webpack_require(/*! C:\Users\cristian.abelleira\myproject\src\main.ts */"./src/main.ts");

How can I prevent this behaviour?

Note: I used "ng build" command to generate /dist folder

angular.js: https://gist.github.com/CrAbelleira/11c2eb2d25ade5a7ac7bf34d0b8e7952


Solution

I found the problem. It was a misconfiguration that was preventing the command "ng build --configuration production" to be executed with the "--configuration production" flag properly.

After compiling with this flag, the references dissapeared.



Answered By - Cristian Abelleira
Answer Checked By - Marie Seifert (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing