Skip to content

refactor(nuxt,schema,vite,webpack): use unplugin for vfs#29165

Merged
danielroe merged 21 commits intomainfrom
refactor/unplugin-vfs
Oct 9, 2024
Merged

refactor(nuxt,schema,vite,webpack): use unplugin for vfs#29165
danielroe merged 21 commits intomainfrom
refactor/unplugin-vfs

Conversation

@danielroe
Copy link
Copy Markdown
Member

@danielroe danielroe commented Sep 25, 2024

🔗 Linked issue

context: #29142

📚 Description

this migrates away from webpack-virtual-modules in favour of using unplugin to provide the nuxt vfs. it means we can use a consistent implementation that is bundler-agnostic.

Some key differences:

  • internal vfs paths now always include file extension (previously #build/<filename> paths stripped it - this should not make a difference to resolution but might if manually accessing nuxt.vfs
  • we now respect nuxt extensions
  • we now add two different vfs plugins - one for server + one for client - this will likely address potential bugs
  • we now support a convention of .client and .server suffixes in the vfs for conditional resolution in server vs client
  • #build is now in nuxt.options.alias again
  • we have added a null byte - \0virtual:nuxt: is the prefix - in line with vite convention and other plugins

🚧 TODO

  • tailwindcss
  • i18n module

@bolt-new-by-stackblitz
Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@danielroe danielroe requested a review from antfu September 25, 2024 22:44
@danielroe danielroe marked this pull request as ready for review September 25, 2024 23:15
@danielroe
Copy link
Copy Markdown
Member Author

@danielroe danielroe merged commit 56d2261 into main Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants