Skip to content

Commit baabb9a

Browse files
committed
fix: legacy node replaceAll
1 parent a940b50 commit baabb9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/transform.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export default defineComponent({
4343
}
4444

4545
function nameProcess(id: string, mode: Options['mode']) {
46-
const commonId = id.replaceAll('\\', '/').split('?')[0]
46+
const commonId = id.replace(/\\/g, '/').split('?')[0]
4747
if (typeof mode === 'string') {
4848
const parseUrl = pathParse(commonId)
4949
const fileName = parseUrl.name

0 commit comments

Comments
 (0)