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

Don't exclude assets that were imported with a namespace #4387

Merged
merged 4 commits into from
Mar 26, 2020

Conversation

mischnic
Copy link
Member

@mischnic mischnic commented Mar 26, 2020

↪️ Pull Request

Supersedes #4220

Closes #4216

  • Don't exclude assets that were imported with a namespace because they themselves might be needed

  • This also fixes namespace reexports of excluded assets

We might be able to optimize this further in the future when we have better knowledge of symbols in the bundle graph (#4375)

💻 Examples

Doing a wildcard import of this (with sideEffects: false)

export * from "./exports";

export const Main = "main";

would make Main disappear because the identifier of that very asset is missing an d was replaced with an empty object: $parcel$exportWildcard(..., {}).

cc @wbinnssmith

@height
Copy link

height bot commented Mar 26, 2020

Link Height tasks by mentioning a task ID in the pull request title or description, commit messages, or comments.

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

@parcel-benchmark
Copy link

parcel-benchmark commented Mar 26, 2020

Benchmark Results

packages/benchmarks/three 🚨

Timings

Description Time Difference
Cold FAILED -0.00ms
Cached FAILED -0.00ms

Cold Bundles

No bundles found, this is probably a failed build...

Cached Bundles

No bundles found, this is probably a failed build...

packages/benchmarks/kitchen-sink 🚨

Timings

Description Time Difference
Cold FAILED -0.00ms
Cached FAILED -0.00ms

Cold Bundles

No bundles found, this is probably a failed build...

Cached Bundles

No bundles found, this is probably a failed build...

packages/benchmarks/react-hn 🚨

Timings

Description Time Difference
Cold FAILED -0.00ms
Cached FAILED -0.00ms

Cold Bundles

No bundles found, this is probably a failed build...

Cached Bundles

No bundles found, this is probably a failed build...

packages/benchmarks/ak-editor 🚨

Timings

Description Time Difference
Cold FAILED -0.00ms
Cached FAILED -0.00ms

Cold Bundles

No bundles found, this is probably a failed build...

Cached Bundles

No bundles found, this is probably a failed build...

Click here to view a detailed benchmark overview.

@mischnic mischnic force-pushed the wildcard-excluded2 branch 2 times, most recently from 30146eb to a6ae32f Compare March 26, 2020 20:39
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.

Scope hoisting: import * with re-exporting does not include all exports
3 participants