Features
Some features of Nuxt are available on an opt-in basis, or can be disabled based on your needs.
features
devLogs
Stream server logs to the client as you are developing. These logs can be handled in the dev:ssr-logs
hook.
By default, this is enabled in development (when test mode is not active).
If set to silent
, the logs will not be printed to the browser console.
export default defineNuxtConfig({
features: {
devLogs: true,
},
})
inlineStyles
Inlines styles when rendering HTML. This is currently available only when using Vite.
You can also pass a function that receives the path of a Vue component and returns a boolean indicating whether to inline the styles for that component.
It defaults to (id) => id.includes('.vue')
.
export default defineNuxtConfig({
features: {
inlineStyles: false, // or a function to determine inlining
},
})
noScripts
Turn off rendering of Nuxt scripts and JavaScript resource hints. Can also be configured granularly within routeRules
.
You can also disable scripts more granularly within routeRules
.
If set to 'production' or true
, JavaScript will be disabled in production mode only. If set to 'all', JavaScript will be disabled in both development and production modes.
export default defineNuxtConfig({
features: {
noScripts: true, // or 'production' | 'all' | false
},
})
future
There is also a future
namespace for early opting-in to new features that will become default in a future (possibly major) version of the framework.
compatibilityVersion
This is used for enabling early access to Nuxt features or flags.
It is not configurable yet in Nuxt 4, but once we begin merging breaking changes for v5, it will be possible to enable it.
multiApp
This enables early access to the experimental multi-app support. You can follow the tracker issue #21635 to see the progress of multi-app support in Nuxt.
export default defineNuxtConfig({
future: {
multiApp: true,
},
})
typescriptBundlerResolution
This enables 'Bundler' module resolution mode for TypeScript, which is the recommended setting for frameworks like Nuxt and Vite.
It improves type support when using modern libraries with exports
.
See the original TypeScript pull request.
You can set it to false to use the legacy 'Node' mode, which is the default for TypeScript.
export default defineNuxtConfig({
future: {
typescriptBundlerResolution: false,
},
})