Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.

feat(vite): use externality to resolve externals for ssr dev bundler#1172

Merged
pi0 merged 9 commits intomainfrom
fix/vite-externals
Oct 20, 2021
Merged

feat(vite): use externality to resolve externals for ssr dev bundler#1172
pi0 merged 9 commits intomainfrom
fix/vite-externals

Conversation

@danielroe
Copy link
Copy Markdown
Member

@danielroe danielroe commented Oct 18, 2021

🔗 Linked issue

some context: nuxt/nuxt#11824
closes nuxt/nuxt#12219

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

This PR replaces the current externals check with one based on wp5's resolution algorithm using externality.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.
  • I have a partial implementation of a function to check if an external is a valid ESM import and inline if not - would that be useful to include in this PR @pi0?

@danielroe danielroe added enhancement New feature or request vite labels Oct 18, 2021
@danielroe danielroe requested a review from pi0 October 18, 2021 14:11
@danielroe danielroe self-assigned this Oct 18, 2021
@netlify
Copy link
Copy Markdown

netlify Bot commented Oct 18, 2021

✔️ Deploy Preview for nuxt3-docs canceled.

🔨 Explore the source changes: 46b0ac2

🔍 Inspect the deploy log: https://app.netlify.com/sites/nuxt3-docs/deploys/616fd8b73b1f7c0007c6749d

@pi0 pi0 changed the title feat(vite): use externality to resolve externals for vite feat(vite): use externality to resolve externals for ssr dev bundler Oct 18, 2021
Comment thread packages/vite/src/dev-bundler.ts Outdated
Comment thread packages/vite/src/dev-bundler.ts Outdated
Comment thread packages/vite/src/dev-bundler.ts Outdated
Comment thread packages/vite/src/dev-bundler.ts
@pi0
Copy link
Copy Markdown
Member

pi0 commented Oct 18, 2021

I have a partial implementation of a function to check if an external is a valid ESM import and inline if not - would that be useful to include in this PR @pi0?

We have some detection system in jiti as well. I think worth doing it later and move logic to mlly and using in externality.

Comment thread packages/vite/src/dev-bundler.ts Outdated
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.x enhancement New feature or request vite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error 500 in Fresh Install of nuxt3

2 participants