mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 23:22:02 +00:00
fix(nuxt3): ensure import names are unique
This commit is contained in:
parent
23a7db2a59
commit
5fef9e8db2
@ -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 <T, K extends keyof T> (arr: T[], key: K) {
|
||||
|
Loading…
Reference in New Issue
Block a user