Skip to content

Commit 7741e41

Browse files
authored
复用 shortFilePath 计算结果
复用 shortFilePath 计算结果,避免重复计算
1 parent 74b93f7 commit 7741e41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ export default function loader(
243243
// from the devtools.
244244
propsToAttach.push([
245245
`__file`,
246-
JSON.stringify(rawShortFilePath.replace(/\\/g, '/')),
246+
JSON.stringify(shortFilePath),
247247
])
248248
} else if (options.exposeFilename) {
249249
// Libraries can opt-in to expose their components' filenames in production builds.

0 commit comments

Comments
 (0)