messageCompiler is not a function on build. how to set runtimeOnly: false?
- Dominant language
- TypeScript
- Stars
- 204
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
readme at https://github.com/intlify/bundle-tools/tree/main/packages/vite-plugin-vue-i18n states that for build you need to set the runtimeOnly option to false.
but how to set it in Nuxt3? build fails with `messageCompiler is not a function`
such things don't work:
```js
export default defineNuxtConfig({
buildModules: ['@intlify/nuxt3'],
vite: {
resolve: {
alias: {
'vue-i18n': 'vue-i18n/dist/vue-i18n.runtime.esm-bundler.js'
}
}
},
alias: {
'vue-i18n': 'vue-i18n/dist/vue-i18n.runtime.esm-bundler.js'
},
```
(in fact these options are completely ignored because setting there non-existent files doesn't break build)
UPD
looking at callstack, it is error in compileMessageFormat func, that is part of @intlify/core-base
aliasing it also doesn't work:
```js
vite: {
resolve: {
alias: {
'@intlify/core-base': '@intlify/core-base/dist/core-base.esm-bundler.js'
}
}
},
alias: {
'@intlify/core-base': '@intlify/core-base/dist/core-base.esm-bundler.js'
},
```
Contributor guide
Assessment
This issue has not been assessed yet.