diff --git a/packages/nuxt3/src/pages/utils.ts b/packages/nuxt3/src/pages/utils.ts index 42adf09586..cc7ac3abbc 100644 --- a/packages/nuxt3/src/pages/utils.ts +++ b/packages/nuxt3/src/pages/utils.ts @@ -270,7 +270,7 @@ function hasSuffix (path: string, suffix: string) { } export function getImportName (name: string) { - return pascalCase(name).replace(/[^\w]/g, '') + return pascalCase(name).replace(/[^\w]/g, r => '_' + r.charCodeAt(0)) } function uniqueBy (arr: T[], key: K) {