Skip to content

Commit fcf8439

Browse files
committed
fix: resolve @intlify/utils/h3 by alias
1 parent d0baa40 commit fcf8439

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/nitro.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { resolveModuleExportNames } from 'mlly'
22
import { defu } from 'defu'
33
import { existsSync } from 'node:fs'
4-
import { addServerHandler, addServerImports, addServerPlugin, addServerTemplate, resolvePath } from '@nuxt/kit'
4+
import { addServerHandler, addServerImports, addServerPlugin, addServerTemplate, resolveModule, resolvePath } from '@nuxt/kit'
55
import yamlPlugin from '@rollup/plugin-yaml'
66
import json5Plugin from '@miyaneee/rollup-plugin-json5'
77
import { getDefineConfig } from './bundler'
@@ -40,7 +40,7 @@ export async function setupNitro(ctx: I18nNuxtContext, nuxt: Nuxt) {
4040
{ name: 'defineI18nLocaleDetector', from: ctx.resolver.resolve('runtime/composables/server') },
4141
])
4242

43-
const h3UtilsExports = await resolveModuleExportNames('@intlify/utils/h3')
43+
const h3UtilsExports = await resolveModuleExportNames(resolveModule('@intlify/utils/h3'))
4444
addServerImports([
4545
{ name: 'useTranslation', from: '@intlify/h3' },
4646
...h3UtilsExports.map(name => ({ name, from: '@intlify/utils/h3' })),

0 commit comments

Comments
 (0)