Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2704e85

Browse filesBrowse files
authored
fix: generate unique component id (#538)
1 parent 46d3d65 commit 2704e85
Copy full SHA for 2704e85

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎packages/plugin-vue/src/utils/descriptorCache.ts

Copy file name to clipboardExpand all lines: packages/plugin-vue/src/utils/descriptorCache.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export function createDescriptor(
4040

4141
// ensure the path is normalized in a way that is consistent inside
4242
// project (relative to root) and on different systems.
43-
const normalizedPath = normalizePath(path.relative(root, filename))
43+
const normalizedPath = normalizePath(filename)
4444

4545
const componentIdGenerator = features?.componentIdGenerator
4646
if (componentIdGenerator === 'filepath') {
@@ -49,7 +49,7 @@ export function createDescriptor(
4949
descriptor.id = getHash(normalizedPath + source)
5050
} else if (typeof componentIdGenerator === 'function') {
5151
descriptor.id = componentIdGenerator(
52-
normalizedPath,
52+
normalizePath(path.relative(root, filename)),
5353
source,
5454
isProduction,
5555
getHash,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.