Build Optimizer breaks on `gsap` dependency
Bug Report or Feature Request (mark with an x)
- [ x ] bug report -> please search issues before submitting
- [ ] feature request
Command (mark with an x)
- [ ] new
- [ x ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Versions
Angular CLI: 6.1.2 Node: 8.9.4 OS: darwin x64 Angular: 6.1.1 ... animations, common, compiler, compiler-cli, core, forms ... http, language-service, platform-browser ... platform-browser-dynamic, router
Package Version
@angular-devkit/architect 0.6.8 @angular-devkit/build-angular 0.6.8 @angular-devkit/build-optimizer 0.6.8 @angular-devkit/core 0.0.29 @angular-devkit/schematics 0.7.2 @angular/cli 6.1.2 @ngtools/webpack 6.0.8 @schematics/angular 0.7.2 @schematics/update 0.7.2 rxjs 6.2.2 typescript 2.9.2 webpack 4.8.3
macOs High Sierra 10.13.2
Repro steps
- ng serve --prod
https://github.com/lichunbin814/ngcli6WithGsapBuildError
The log given by the failure
Uncaught TypeError: Cannot set property '_autoActivated' of undefined
at Object.zUnb (main.67da554f7ccc2d4026c6.js:1)
at p (runtime.a66f828dca56eeb90e02.js:1)
at Object.3 (main.67da554f7ccc2d4026c6.js:1)
at p (runtime.a66f828dca56eeb90e02.js:1)
at n (runtime.a66f828dca56eeb90e02.js:1)
at Array.e [as push] (runtime.a66f828dca56eeb90e02.js:1)
at main.67da554f7ccc2d4026c6.js:1
Desired functionality
exclude some node_module when I use buildOptimizer flag ,keep other files can be optimizations
Mention any other details that might be useful
it works on buildOptimizer:false
We currently do not have such functionality.
Do I have another solution to keep buildOptimzer:true ?
I have exactly the same issue !
Are there any news?
This would be a great feature to have, as buildOptimizer breaks one of my dependencies and I end up having to copy it to resources/ and include it via index.html, which is pretty ugly.
This just sounds like a bug in build optimizer. It should generally be safe to run on a library, so if it is breaking gsap, then we should look into why and fix that.
Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. Please update to the most recent Angular CLI version.
If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.