diff --git a/README.md b/README.md index 53c16ca..8c30f65 100644 --- a/README.md +++ b/README.md @@ -158,6 +158,21 @@ build({ You might not need this plugin for Nuxt. Use `@productdevbook/ts-i18n/nuxt` instead. +```ts +// nuxt.config.ts + +export default defineNuxtConfig({ + modules: [ + '@productdevbook/ts-i18n/nuxt', + ], + + tsI18n: { + exportFilePath: './i18n.d.ts', + localesFolder: 'locales', + selectLanguage: 'en', + }, +}) +```
diff --git a/src/unplugin/nuxt.ts b/src/unplugin/nuxt.ts index ab841a8..6f575f0 100644 --- a/src/unplugin/nuxt.ts +++ b/src/unplugin/nuxt.ts @@ -10,8 +10,8 @@ export interface ModuleOptions extends Options { export default defineNuxtModule({ meta: { - name: 'ts-i18n', - configKey: 'unpluginStarter', + name: 'tsI18n', + configKey: 'tsI18n', }, setup(options, _nuxt) { addVitePlugin(() => vite(options))