Support static inline colouring for dynamic import - #2295
Merged
Conversation
guybedford
force-pushed
the
dynamic-inline-colouring
branch
from
June 21, 2018 21:28
e957024 to
e7360a2
Compare
lukastaegert
force-pushed
the
dynamic-inline-colouring
branch
from
June 25, 2018 05:36
b508348 to
e7360a2
Compare
lukastaegert
approved these changes
Jun 25, 2018
lukastaegert
left a comment
Member
There was a problem hiding this comment.
Works very nicely!
One minor note: It would be nice to have the dynamic import actually used in the test so that we can see the automatic inlining. You might for instance turn it around—export the dynamic import and make the synchronous import an "empty import". This would also showcase a simple way how to inline specific dynamic imports.
guybedford
force-pushed
the
dynamic-inline-colouring
branch
from
June 26, 2018 17:24
e7360a2 to
e0bc164
Compare
Contributor
Author
|
Sure I've switched around the test here, and in the process uncovered a dynamic import inlining bug which I've fixed as well :) |
guybedford
force-pushed
the
dynamic-inline-colouring
branch
from
June 26, 2018 17:59
e0bc164 to
74a0b80
Compare
calebeby
referenced
this pull request
in Pigmice2733/scouting-frontend
Jun 30, 2018
This Pull Request updates dependency [rollup](https://github.com/rollup/rollup) from `v0.61.2` to `v0.62.0` <details> <summary>Release Notes</summary> ### [`v0.62.0`](https://github.com/rollup/rollup/blob/master/CHANGELOG.md#​0620) [Compare Source](rollup/rollup@v0.61.2...v0.62.0) *2018-06-27* * Add option to automatically shim missing exports ([#​2118](`https://github.com/rollup/rollup/pull/2118`)) * Inline dynamic imports that are also imported statically and only used in a single chunk ([#​2295](`https://github.com/rollup/rollup/pull/2295`)) * Handle caching and invalidation of assets ([#​2267](`https://github.com/rollup/rollup/pull/2267`)) * Fix plugin related types ([#​2299](`https://github.com/rollup/rollup/pull/2299`)) --- </details> --- This PR has been generated by [Renovate Bot](https://renovatebot.com).
stipsan
referenced
this pull request
in scroll-into-view/compute-scroll-into-view
Jul 5, 2018
This Pull Request updates dependency [rollup](https://github.com/rollup/rollup) from `v0.61.2` to `v0.62.0` <details> <summary>Release Notes</summary> ### [`v0.62.0`](https://github.com/rollup/rollup/blob/master/CHANGELOG.md#​0620) [Compare Source](rollup/rollup@v0.61.2...v0.62.0) *2018-06-27* * Add option to automatically shim missing exports ([#​2118](`https://github.com/rollup/rollup/pull/2118`)) * Inline dynamic imports that are also imported statically and only used in a single chunk ([#​2295](`https://github.com/rollup/rollup/pull/2295`)) * Handle caching and invalidation of assets ([#​2267](`https://github.com/rollup/rollup/pull/2267`)) * Fix plugin related types ([#​2299](`https://github.com/rollup/rollup/pull/2299`)) --- </details> --- This PR has been generated by [Renovate Bot](https://renovatebot.com).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This solves the issue described by @eight04 in #2284 (comment).
If a the time of checking a dynamic import, its already in the same static graph as the parent, then we don't treat it as a dynamic import at that point.
Only if later on we discover that the dynamic import is imported uniquely from a colouring where it is not already in that colouring's static graph do we properly raise it to the status of entry point.