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

fix: dependency scan with esbuild when using non-HTML entrypoints #1772

Merged
merged 2 commits into from Jan 28, 2021

Conversation

ElMassimo
Copy link
Contributor

@ElMassimo ElMassimo commented Jan 28, 2021

Description 馃摉

This pull request is an attempt to fix #1763.

By passing entries to the esbuildScanPlugin, we are able to avoid passing external: true to esbuild.

This change needs to be reviewed to assess the potential impact of the change.

Dependencies in the entrypoints, such as vue, seem to be correctly detected and optimized, but I might be missing some corner cases.

Background 馃摐

After beta.51 introduced an esbuild-based dependency scan, projects with non-HTML entrypoints started to fail with an esbuild error:

  • cannot be marked as external

build works as expected in beta.51 for multiple non-HTML entrypoints, so it's only the dependency scanning that suffers this problem.

Reproduction 馃悶

The issue can be replicated in this application, by running pnpm install and pnpm dev.

@yyx990803
Copy link
Member

Fixed type + more assets/css edge case handling, waiting on CI

@yyx990803 yyx990803 merged commit ca862a2 into vitejs:main Jan 28, 2021
@ElMassimo ElMassimo deleted the fix-multi-entry-dep-scan branch January 28, 2021 15:07
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.

Regression - The entry point cannot be marked as external
2 participants