framework
framework copied to clipboard
feat(vite): support `build.transpile` as function
🔗 Linked issue
#7016
❓ 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)
- [x] ✨ New feature (a non-breaking change that adds functionality)
- [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to change)
📚 Description
Resolves #7016 - When building Nuxt with Vite, build.transpile
will now except functions. This will allow users to transpile modules through Vite's pipeline.
Additional notes
- I've added
isClient
,isServer
, andisDev
to the ctx. Although for now this is only used with Vite's SSR property. - I left out
isLegacy
andisModern
because it seems irrelevant when using Vite. Is this correct?
📝 Checklist
- [x] I have linked an issue or discussion.
- [ ] I have updated the documentation accordingly.
Open in CodeSandbox Web Editor | VS Code | VS Code Insiders
Deploy Preview for nuxt3-docs canceled.
Name | Link |
---|---|
Latest commit | c24700556bdd637778116e8511823e3a68840509 |
Latest deploy log | https://app.netlify.com/sites/nuxt3-docs/deploys/63494eb46272260009ef5416 |
@pi0 @jmorel88 can we have this merged please? It's really needed in some cases.
Some libraries / modules works on dev server without transpilation & doesn't work on production build and vice versa. For example https://github.com/aspida/aspida (their @aspida/axios package).