Skip to content

Commit

Permalink
fix(alias): do not use runtime version during nuxt prepare (nuxt-modu…
Browse files Browse the repository at this point in the history
…les#2180)

* fix(alias): do not use runtime version during nuxt prepare

* lint
  • Loading branch information
yassilah authored Jul 3, 2023
1 parent f80c3e9 commit 7c20648
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/alias.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ export async function setupAlias(nuxt: Nuxt) {

export async function resolveVueI18nAlias(pkgModulesDir: string, nuxt: Nuxt, pkgMgr: PackageManager) {
const { rootDir, workspaceDir } = nuxt.options
const modulePath = nuxt.options.dev
? `${VUE_I18N_PKG}/dist/vue-i18n.mjs`
: `${VUE_I18N_PKG}/dist/vue-i18n.runtime.mjs`
const modulePath =
nuxt.options.dev || nuxt.options._prepare
? `${VUE_I18N_PKG}/dist/vue-i18n.mjs`
: `${VUE_I18N_PKG}/dist/vue-i18n.runtime.mjs`
const targets = [
// for Nuxt layer
...getLayerRootDirs(nuxt).map(root => resolve(root, 'node_modules', modulePath)),
Expand Down

0 comments on commit 7c20648

Please sign in to comment.