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’ll 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
1 of 15 tasks
nadavsinai opened this issue Dec 1, 2019 · 2 comments
Closed
1 of 15 tasks

Comments

@nadavsinai
Copy link

🐞 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
Copy link
Collaborator

Duplicate of #16275

@alan-agius4 alan-agius4 marked this as a duplicate of #16275 Dec 2, 2019
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jan 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants