File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -65,11 +65,11 @@ module.exports = function (source) {
65
65
}
66
66
67
67
// module id for scoped CSS & hot-reload
68
- const shortFilePath = path
68
+ const rawShortFilePath = path
69
69
. relative ( context , resourcePath )
70
- . replace ( / \\ / g , '/ ' )
71
- . replace ( / ^ ( \. \. \/ ) + / , '' ) +
72
- resourceQuery
70
+ . replace ( / ^ ( \. \. [ \/ \\ ] ) + / , '' )
71
+
72
+ const shortFilePath = rawShortFilePath . replace ( / \\ / g , '/' ) + resourceQuery
73
73
74
74
const id = hash (
75
75
isProduction
@@ -161,7 +161,7 @@ var component = normalizer(
161
161
162
162
// Expose filename. This is used by the devtools and vue runtime warnings.
163
163
if ( ! isProduction ) {
164
- code += `\ncomponent.options.__file = ${ JSON . stringify ( shortFilePath ) } `
164
+ code += `\ncomponent.options.__file = ${ JSON . stringify ( rawShortFilePath ) } `
165
165
}
166
166
167
167
code += `\nexport default component.exports`
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ const baseConfig = {
43
43
}
44
44
45
45
function genId ( file ) {
46
- return hash ( path . join ( 'test' , 'fixtures' , file ) )
46
+ return hash ( path . join ( 'test' , 'fixtures' , file ) . replace ( / \\ / g , '/' ) )
47
47
}
48
48
49
49
function bundle ( options , cb , wontThrowError ) {
You can’t perform that action at this time.
0 commit comments