Skip to content

Commit

Permalink
feat(nuxt): enable lazy loading for i18n
Browse files Browse the repository at this point in the history
This change enables lazy loading for the i18n module in the Nuxt.js
configuration. This will improve the initial load time of the application
by only loading the required translations when they are needed.

The `lazy` option is set to `true` in the `i18n` configuration block,
which is the recommended setting for production environments.
  • Loading branch information
nexmoe committed May 14, 2024
1 parent 1796730 commit 48aa3b6
Show file tree
Hide file tree
Showing 2 changed files with 7,190 additions and 9,569 deletions.
2 changes: 1 addition & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default defineNuxtConfig({
},
],
defaultLocale: 'zh-CN',
// lazy: true,
lazy: true,
langDir: 'locales/',
},

Expand Down
Loading

0 comments on commit 48aa3b6

Please sign in to comment.