Skip to content

Dynamic imports priority fix closes #6980#7061

Merged
devongovett merged 16 commits into
parcel-bundler:v2from
highvoltag3:dynamic-imports-priority-fix
Mar 20, 2022
Merged

Dynamic imports priority fix closes #6980#7061
devongovett merged 16 commits into
parcel-bundler:v2from
highvoltag3:dynamic-imports-priority-fix

Conversation

@highvoltag3

@highvoltag3 highvoltag3 commented Oct 13, 2021

Copy link
Copy Markdown
Contributor

↪️ Pull Request

Fixes #6980 by leveraging the <link rel=preload>+<script async> "hack" which makes both {loading,scheduling} priority high in engines that do not support native esmodules when Parcel inserts <script async> tags into the head which are loaded with low priority.

💻 Examples

See: https://addyosmani.com/blog/script-priorities/

✔️ PR Todo

  • Added/updated unit tests for this change
  • Included links to related issues/PRs

@height

height Bot commented Oct 13, 2021

Copy link
Copy Markdown

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

Comment thread packages/core/integration-tests/test/javascript.js Outdated
@wbinnssmith

Copy link
Copy Markdown
Contributor

Looks like some existing tests are now failing, likely because they assert the number of things in <head>. Should be straightforward to adjust the test to those new values assuming everything else remains correct.

@highvoltag3

Copy link
Copy Markdown
Contributor Author

Looks like some existing tests are now failing, likely because they assert the number of things in <head>. Should be straightforward to adjust the test to those new values assuming everything else remains correct.

Odd... seems to be passing for me even after merging the latest V2 branch.

@devongovett devongovett merged commit c394019 into parcel-bundler:v2 Mar 20, 2022
gorakong pushed a commit that referenced this pull request Nov 3, 2022
* upstream/v2:
  Upgrade Flow to 0.174.1 (#7849)
  v2.4.0
  v2.4.0 changelog
  Bump Parcel CSS
  Dynamic imports priority fix closes #6980 (#7061)
  fix(transformers): errors.map is not a function (#7672)
  Make NodeResolver check realpath before resolving with `source` entry (#7846)
  docs: fix wrong location documents (#7689)
  Fix: escape double quote of url value in CSS `url()` (#7718)
  Update @parcel/css and add diagnostic for url dependencies in custom properties (#7845)
  Use relative path for bundle labels in bundle analysis (#7737)
  Allow use react-jsx transform in React 16.14.0 (#7728)
  Move to @parcel/css by default (#7821)
  Feature: pick PORT number also from .env file (#7819)
  Enable parsing static initialization blocks (#7839)
  Bump swc and prevent pure comment removal (#7833)
  Bump swc (#7777)
  Human readable file size in bundle analyzer report (#7766)
  Improve emoji support detection (#7775)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dynamic imports loaded as low-priority scripts when compiled

3 participants