-
-
Notifications
You must be signed in to change notification settings - Fork 179
Application build errors due to UglifyJS #232
Comments
@dangrima90 seems bug in |
Thanks for your reply. I'll try setting up a sample project to replicate the issue as the project I'm working on is a private project so I can't really share the code, hope that's okay. |
So I created a new project (https://github.com/dangrima90/uglifyjs-issue.git) with the same package.json and webpack config, but the project was built successfully :/ Is there a way to output more information with regards to the error? This is the full error that I'm getting. I'm asking because now I'm thinking that there might be some bit of code from my end that is causing the issue. |
@dangrima90 first try to invalidate cache and resintall deps ( |
@evilebottnawi still no luck :/ I've invalidated the cache and reinstalled everything. To enable the source map would the following config suffice please?
|
@dangrima90 |
@evilebottnawi good morning, sorry for all my questions but I'm at a loss. I've already had "source-map" enabled in the Config: TypeScript Loader - /config/webpack.common.js tsconfig - /tsconfig.webpack.js Production Config - /config/webpack.prod.js
|
@dangrima90 can you remove step by step modules and core to find problem code, it is very diffucult without test repo |
Yes of course I understand.. I'll have a look later and try to pinpoint where the issue is. Like I said above most probably it is in an issue from my code. I'll let you know what the outcome will be. Thanks a lot for your support. |
@dangrima90 feel free to ping me |
@evilebottnawi I've finally found the part of the application that's causing the issue - although I don't know what the problem is. I have a utility class that is used to signify whether the browser tab is active or not:
This is then being used in one of my components to mute the sound in the application if the tab is not active:
|
@dangrima90 Thanks, in near future i will investigate 👍 |
@evilebottnawi Thank you! |
Hi @evilebottnawi, any news on this please? |
@dangrima90 don't have time right, but seems some globals are rewrites and you get invalid uglified file, can you try to disable |
@evilebottnawi Thanks for your reply. I did try it, unfortunately the build still failed. |
Hi @evilebottnawi just to let you know that I've been upgrading my application from Angular 4.4.4 to 5.2.8. During this process I've also updated my webpack config and this issue is not present anymore. I'm not sure what fixed the issue to be honest - but if you require any information from my end let me know. |
@dangrima90 👍 Let's close issue, If somebody have same error, feel free to report here. |
App using Angular 6.0.3 and webpack 4.10.2 fails to build when mangle is set to true. Can reproduce with this repo: If the PR for the temporary fix of disabling mangle has been merged you need to set mangle back to true. |
Switch to |
I have an Angular application which for some reason when I building the code using AOT I'm getting errors from the UglifyJS plugin.
The following is the error I'm getting:
After doing a bit of research it seems that this is an issue with UglifyJS not supporting ES6 (Reference). The application still works as all that's happening is that the main.js is not being minified. But ideally I'd like to have a successful build.
I don't know if there's some other dependency that needs updating or whether I need to set up something differently in my config.
This is my UglifyJSPlugin config:
Webpack Version: 3.8.1
UglifyJS Webpack Plugin: 1.1.8
Angular Version: 4.4.4
The text was updated successfully, but these errors were encountered: