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

fix(vite): add file:// protocol to vite-node entry file path - #4966

Merged
pi0 merged 3 commits into
nuxt:mainfrom
jeremyeo:fix-vite-node
May 13, 2022
Merged

fix(vite): add file:// protocol to vite-node entry file path#4966
pi0 merged 3 commits into
nuxt:mainfrom
jeremyeo:fix-vite-node

Conversation

@jeremyeo

@jeremyeojeremyeo commented May 13, 2022

Copy link
Copy Markdown
Contributor

🔗 Linked issue

nuxt/nuxt#13980

❓ 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

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@netlify

netlifyBot commented May 13, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commitbb20ba7
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/627e287d353c450008f5a230

Comment threadpackages/vite/src/vite-node.ts Outdated
@danielroe

Copy link
Copy Markdown
Member

Would it be worth using pathToFileURL instead?

Comment threadpackages/vite/src/vite-node.ts Outdated
await fse.writeFile(
resolve(ctx.nuxt.options.buildDir, 'dist/server/server.mjs'),
`export { default } from ${JSON.stringify(resolve(distDir, 'runtime/vite-node.mjs'))}`
`export { default } from ${JSON.stringify('file://' + resolve(distDir, 'runtime/vite-node.mjs'))}`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might use pathToFileURL

pi0
pi0 approved these changes May 13, 2022

@pi0pi0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@pi0pi0 changed the title fix(vite): on win, add file:// protocol to vite-node entry file pathfix(vite): add file:// protocol to vite-node entry file pathMay 13, 2022
@pi0
pi0 merged commit bd80d27 into nuxt:mainMay 13, 2022
@pi0pi0 mentioned this pull request Jun 10, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@jeremyeo@danielroe@pi0@antfu