You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Quasar Framework (v3.0.3) and tried to update my dependencies. I followed the steps from https://quasar.dev/options/app-internationalization to get my project Vue3 compatible.
vue-i18n seems to be working fine, but the vue-i18n-loader throws an error when I try to build or server locally:
Final loader (./node_modules/@intlify/vue-i18n-loader/lib/index.js) didn't return a Buffer or String
My i18n boot file is
import { createI18n } from "vue-i18n"
import messages from "src/i18n"
import { boot } from "quasar/wrappers"
const i18n = createI18n({
locale: "de",
messages,
fallbackLocale: "de",
})
export default boot(({ app }) => {
// Set i18n instance on app
app.use(i18n)
app.i18n = i18n
})
export { i18n } // if you need this instance elsewhere
the part where I add the loader:
extendWebpack(cfg) {
cfg.module.rules.push({
test: /\.(json5?|ya?ml)$/, // target json, json5, yaml and yml files
type: "javascript/auto",
// Use `Rule.include` to specify the files of locale messages to be pre-compiled
include: [
// Use `Rule.include` to specify the files of locale messages to be pre-compiled
path.resolve(__dirname, "src/locales"),
],
loader: "@intlify/vue-i18n-loader",
})
// for i18n custom block
cfg.module.rules.push({
resourceQuery: /blockType=i18n/,
type: "javascript/auto",
loader: "@intlify/vue-i18n-loader",
})
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am using Quasar Framework (v3.0.3) and tried to update my dependencies. I followed the steps from https://quasar.dev/options/app-internationalization to get my project Vue3 compatible.
vue-i18n seems to be working fine, but the vue-i18n-loader throws an error when I try to build or server locally:
Final loader (./node_modules/@intlify/vue-i18n-loader/lib/index.js) didn't return a Buffer or String
My i18n boot file is
the part where I add the loader:
My Dependencies:
I appreciate any kind of help or suggestions on this.
Beta Was this translation helpful? Give feedback.
All reactions