4

I have an angular-cli app running and building fine, however I'm bumping into this issue with aot and uglify: git-hub issue / stackoverflow question

In the past to mitigate it I customized the rollup.config.js file with the following:

 plugins: [
        ...
       , uglify({ output: { ascii_only: true } })

    ]

How do I specify this custom uglify plugin setting with an angular-cli app?


This stems from the fact that we have some view templates using &nsbp; in them to add whitespace. Maybe I need to look at an alternative for that escape sequence instead of ejecting the cli and losing parts of it's magic.

cobolstinks
  • 6,801
  • 16
  • 68
  • 97
  • If you want config beyond what the CLI exposes, `ng eject` the webpack config. – jonrsharpe Jul 14 '17 at 21:46
  • Does that mean i lose the ability to run the app via ng commands? – cobolstinks Jul 14 '17 at 22:01
  • I haven't done it, I don't know, but you can surely roll back the change if it doesn't suit. – jonrsharpe Jul 14 '17 at 22:02
  • @cobolstinks after an `ng eject`, you will still be able to use the `ng` commands that create code, but the commands to run and build a project move to `npm` scripts, like `npm start` rather than `ng serve`. The output at the command prompt after running ng eject will show what the replacement commands are. You can look in the package.json to see them, too. [This might be helpful](https://stackoverflow.com/questions/44861191/how-to-work-with-ngcli-after-ejecting-the-webpack-config/44861648#44861648). – R. Richards Jul 14 '17 at 22:46

0 Answers0