Skip to content

feat: port upstream vite-node dev server implementation#779

Merged
danielroe merged 8 commits intonuxt:mainfrom
wattanx:upstream-vite-node
Jun 20, 2023
Merged

feat: port upstream vite-node dev server implementation#779
danielroe merged 8 commits intonuxt:mainfrom
wattanx:upstream-vite-node

Conversation

@wattanx
Copy link
Copy Markdown
Collaborator

@wattanx wattanx commented May 21, 2023

🔗 Linked issue

❓ 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

I will port vite-node-server from Nuxt 3.

📝 Checklist

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

@wattanx wattanx force-pushed the upstream-vite-node branch from 38bbbd4 to 63fcab2 Compare May 21, 2023 09:15
@wattanx wattanx force-pushed the upstream-vite-node branch from 63fcab2 to 73a1531 Compare May 21, 2023 13:43
@wattanx wattanx marked this pull request as ready for review June 4, 2023 07:53
@danielroe danielroe requested a review from antfu June 8, 2023 10:08
@antfu
Copy link
Copy Markdown
Member

antfu commented Jun 8, 2023

In general it looks good to me. Can you point me out the changes you made to the original code when doing that port, if any? It would be helpful to review. Thanks

Copy link
Copy Markdown
Collaborator Author

@wattanx wattanx left a comment

Choose a reason for hiding this comment

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

I commented on the changes made from the original code!

Comment on lines +112 to +113
'entry.mjs': {
file: 'entry.mjs',
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Changes made to original code.

original code is

[ctx.entry]: {
  file: ctx.entry
}

Comment thread packages/bridge/src/vite/dev-bundler.ts Outdated
// Build and watch
const _doBuild = async () => {
const start = Date.now()
const { code, ids } = await bundleRequest(options, '/.nuxt/entry.mjs')
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Changes made to original code.

original code is

const { code, ids } = await bundleRequest(options, ctx.entry)

Comment on lines +164 to +166
'entry.mjs': {
isEntry: true,
file: 'entry.mjs',
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Changes made to original code.

original code is

[ctx.entry]: {
  isEntry: true, // no change
  file: ctx.entry
}

// Build and watch
const _doBuild = async () => {
const start = Date.now()
const { code, ids } = await bundleRequest(options, '/.nuxt/server.js')
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Changes made to original code.

original code is

const { code, ids } = await bundleRequest(options, ctx.entry)

@danielroe danielroe changed the title feat: upstream vite-node-server feat: port upstream vite-node dev server implementation Jun 20, 2023
@danielroe danielroe merged commit c29f91a into nuxt:main Jun 20, 2023
@danielroe danielroe mentioned this pull request Jun 20, 2023
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.

3 participants