fuse-box/fuse-box

angular 11.0.6 breaks with runProd + ES5 target

jpike88 opened this issue · 14 comments

UPDATED

How to repro:

  • Use angular_playground in this repo
  • Use Typescript version 4.1.4
  • Run something like node-check-updates on the angular_playground, which will fast forward angular to 11.1.2
  • add buildTarget: 'ES5' to runProd config
  • Look at page, you will see a broken template tag (See screenshot)

Screenshot 2021-02-10 at 1 22 24 AM

This issue is not present with angular 11.0.5, it appears when switching to 11.0.6.

Here's code to easily install/switch between versions:

npm i @angular/animations@11.0.5 @angular/common@11.0.5 @angular/compiler@11.0.5 @angular/core@11.0.5 @angular/forms@11.0.5 @angular/platform-browser@11.0.5 @angular/platform-browser-dynamic@11.0.5 @angular/router@11.0.5 @angular/cli@11.0.5 @angular/compiler-cli@11.0.5 @angular/language-service@11.0.5 --force

@nchanged I tried a couple of other targets like es2015, es6 and they worked ok, just es5 doesn't work

@nchanged breakthrough! issue is related to angular version, starts to happen between version 11.0.5 and 11.0.6

https://github.com/angular/angular/blob/master/CHANGELOG.md#1106-2021-01-06

completely forgot about this. looks like I'll need to keep my angular version on 11.0.5, but it's now 6 months old

@nchanged any clue/thoughts about this? it's a weird one

Somewhere in the following commits, something broke fuse-box.

https://github.com/angular/angular/commits/master?before=5b9c981b6d4e4f96236858773f84750a46260986+35&branch=master
https://github.com/angular/angular/commits/master?after=5b9c981b6d4e4f96236858773f84750a46260986+21&branch=master

@nchanged does a quick skim of these show anything problematic? I'm going to build specific commits and find the breaking one now

@nchanged had another stab at this... no idea what could be causing it.

@jpike88 does it happen without typescript? I mean if you remove buildTarget: 'ES5'

Because if it's ok, that means that the actual typescript is corrupting your build.

without ES5, it builds fine.

I've tried with typescript 4.0.2 all the way to current 4.4-rc

I've tried with angular 11.0.6 onwards, up until 12.2.1...

The only thing I can clearly tell is breaking anything is when angular 11.0.5 upgrades to 11.0.6. 11.0.5 even works with latest typescript. and there are no issues reported regarding TS causing template binding to just not work.

I think something weirder is going on

@nchanged will you have some time in the next week or two to investigate? I've tried a few times to diagnose the problem here and am out of ideas

Even if you just flag the issue I can have a go at fixing it

All my testing has been in the angular playground, this isn't related to my particular setup

I took both the app.js and vendor.js, and converted them in the TS playground using the ES5 target. I then pasted them back into their files locally.. worked fine

closing cause I'm just going to drop es5 support