framework
framework copied to clipboard
feat(webpack, vite): default to `.js` extension for client
🔗 Linked issue
https://github.com/nuxt/framework/pull/6232#issuecomment-1199214638 https://github.com/nuxt/framework/discussions/6168
❓ Type of change
- [ ] 📖 Documentation (updates to the documentation or readme)
- [x] 🐞 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
Now that we have updated vue-bundle-renderer, we can output.js files on client-side, for better support with CDN/web servers.
This PR also allows users to configure their output filenames on vite. (Previously it always overrode them.)
import { defineNuxtConfig } from 'nuxt'
export default defineNuxtConfig({
vite: {
build: {
rollupOptions: {
output: {
chunkFileNames: '_nuxt/[hash].mjs'
}
}
}
}
})
📝 Checklist
- [x] I have linked an issue or discussion.
- [ ] I have updated the documentation accordingly.
Deploy Preview for nuxt3-docs canceled.
| Name | Link |
|---|---|
| Latest commit | b2b7b001d19fa9979292c8fa8a936d6573d31bbb |
| Latest deploy log | https://app.netlify.com/sites/nuxt3-docs/deploys/62f4bcb0526d530008665056 |