bundle
object
{ compositionOnly: true, runtimeOnly: false, fullInstall: true, dropMessageCompiler: false }
Configure the bundling optimization for nuxt i18n module.
Supported properties:
compositionOnly
boolean
true
Whether to make vue-i18n API only composition API. By default the legacy API is tree-shaken. For more details, See here
compositionOnly: false
. Note that setting this value will disable Vue I18n Composition API.Note that the Legacy API can also be used in hybrid by setting the Vue I18n option to allowComposition: true
in i18n.config, but this is limited. See here for details.runtimeOnly
boolean
false
Whether or not to automatically use Vue I18n runtime-only in build.
fullInstall
boolean
true
Whether to install the full set of APIs, components, etc. By default, all of them will be installed. If false
is specified, built-in components (i18n-t
, i18n-d
and i18n-n
) and directive (v-t
) will not be installed in vue and will be tree-shaken. For more details, See here
dropMessageCompiler
boolean
false
Whether to tree-shake message compiler when bundling.
compilation.jit
option.onlyLocales
string | string[]
undefined
Specify the locales codes that need to be included, the rest will be removed.
It can be useful if you have one code base (e.g. Nuxt Layers) for several similar projects using different languages.