-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix(vite): improve external checks for dev-bundler #1538
Conversation
βοΈ Deploy Preview for nuxt3-docs ready! π¨ Explore the source changes: b5f7228 π Inspect the deploy log: https://app.netlify.com/sites/nuxt3-docs/deploys/617bb2aa8f73860007c039dd π Browse the preview: https://deploy-preview-1538--nuxt3-docs.netlify.app |
@@ -41,7 +41,6 @@ export async function buildServer (ctx: ViteBuildContext) { | |||
external: [], | |||
noExternal: [ | |||
...ctx.nuxt.options.build.transpile, | |||
/\.(es|esm|esm-browser|esm-bundler).js$/, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are not using externality for prod build, I think would be a safe pattern to keep
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. Shall I follow up with a PR adding externality support for nitro?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested next steps:
- Support externality for vite's prod build
- Support externality for webpack external checks
- Support externality for nitro
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π Linked issue
Lots! For example nuxt/nuxt#12233
closes nuxt/nuxt#12632
β Type of change
π Description
With this PR we use an upgraded
externality
to try to detect (using new utility: unjs/mlly#16) whether an external is in fact valid to import within a node context.π Checklist