Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web-workers are not downleveled to es5 when using differential loading #16329

Closed
nadavsinai opened this issue Dec 1, 2019 · 1 comment
Closed

Comments

@nadavsinai
Copy link

@nadavsinai nadavsinai commented Dec 1, 2019

馃悶 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

Sort of, as far as I understand your code it exists since bundle downleveling was introduced

Description

I'm trying to convert our applications to Angular/CLI. I am responsible for the current custom webpack build of 20+ internal Philips-Algotec Angular applications.
We use web-workers extensively. My custom setup supported differential loading too but did it with two builds. I see this option exists in Angular 8.x but not in 9.x using the process.env.NG_BUILD_DIFFERENTIAL_FULL=1 flag so I'm reluctant to use it.
in the current mode - bundle downleveling the worker's chunks are:

  1. not downleveled at all.
  2. there is no change in the es5 main chunk new Worker construct which should change to use the es5 version of the worker (which unfortunately does not exist )

馃敩 Minimal Reproduction

Simple steps to reproduce this bug.

  • generate a new angular application
  • add IE11 to browserlist to allow for differential loading
  • use ng generate web-worker 'somename' schematic to create a worker
  • use polyfills (in both the app & worker code)
  • but make sure the code in the worker uses new ES2015 language features that need transpilation rather than polyfilling - such as Array spread, string literals etc.
  • try to load site in IE11

I've created a repo with the above steps here

馃敟 Exception or Error


Syntax error

馃實 Your Environment




Angular CLI: 8.3.19
Node: 10.15.0
OS: win32 x64
Angular: 8.2.14
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.803.14
@angular-devkit/build-angular      0.803.19
@angular-devkit/build-ng-packagr   0.803.19
@angular-devkit/build-optimizer    0.803.19
@angular-devkit/build-webpack      0.803.19
@angular-devkit/core               8.3.14
@angular-devkit/schematics         8.3.14
@angular/cdk                       8.2.3
@angular/cli                       8.3.19
@angular/elements                  8.1.2
@angular/flex-layout               8.0.0-beta.27
@ngtools/webpack                   8.3.19
@schematics/angular                8.3.14
@schematics/update                 0.803.19
ng-packagr                         5.7.1
rxjs                               6.5.3
typescript                         3.5.3
webpack                            4.39.2

Anything else relevant?
Browser specific to IE11 or any other non-ever green browser

@alan-agius4

This comment has been minimized.

Copy link
Collaborator

@alan-agius4 alan-agius4 commented Dec 2, 2019

Duplicate of #16275

@alan-agius4 alan-agius4 marked this as a duplicate of #16275 Dec 2, 2019
@alan-agius4 alan-agius4 closed this Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can鈥檛 perform that action at this time.