Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: empty i18n options not loading vue-i18n config file #3093

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: rollup and vite plugin type mismatch
  • Loading branch information
BobbieGoede committed Sep 10, 2024
commit c9b4789223e6da33b439c56a8447990da0ede17c
1 change: 1 addition & 0 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ export default defineNuxtModule<NuxtI18nOptions>({
nuxt.hook('vite:extendConfig', cfg => {
// eslint-disable-next-line @typescript-eslint/no-floating-promises
cfg.plugins ||= []
// @ts-ignore NOTE: A type error occurs due to a mismatch between Vite plugins and those of Rollup
cfg.plugins.push(i18nVirtualLoggerPlugin(options.debug))
})

Expand Down
1 change: 1 addition & 0 deletions src/nitro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export async function setupNitro(
? nitroConfig.rollupConfig.plugins
: [nitroConfig.rollupConfig.plugins]

// @ts-ignore NOTE: A type error occurs due to a mismatch between Vite plugins and those of Rollup
nitroConfig.rollupConfig.plugins.push(i18nVirtualLoggerPlugin(nuxtOptions.debug))

const yamlPaths = getResourcePaths(additionalParams.localeInfo, /\.ya?ml$/)
Expand Down