Skip to content

Commit 0766fe7

Browse files
committed
fix: ensure consistent component id on different OS
ref: vuejs/vue-cli#1728
1 parent 64a5cd3 commit 0766fe7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: lib/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ module.exports = function (source) {
6767
// module id for scoped CSS & hot-reload
6868
const shortFilePath = path
6969
.relative(context, resourcePath)
70-
.replace(/^(\.\.[\\\/])+/, '') +
70+
.replace(/\\/g, '/')
71+
.replace(/^(\.\.\/)+/, '') +
7172
resourceQuery
7273

7374
const id = hash(

0 commit comments

Comments
 (0)