File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 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) {
6565 }
6666
6767 // module id for scoped CSS & hot-reload
68- const shortFilePath = path
68+ const rawShortFilePath = path
6969 . relative ( context , resourcePath )
70- . replace ( / \\ / g , '/ ' )
71- . replace ( / ^ ( \. \. \/ ) + / , '' ) +
72- resourceQuery
70+ . replace ( / ^ ( \. \. [ \/ \\ ] ) + / , '' )
71+
72+ const shortFilePath = rawShortFilePath . replace ( / \\ / g , '/' ) + resourceQuery
7373
7474 const id = hash (
7575 isProduction
@@ -161,7 +161,7 @@ var component = normalizer(
161161
162162 // Expose filename. This is used by the devtools and vue runtime warnings.
163163 if ( ! isProduction ) {
164- code += `\ncomponent.options.__file = ${ JSON . stringify ( shortFilePath ) } `
164+ code += `\ncomponent.options.__file = ${ JSON . stringify ( rawShortFilePath ) } `
165165 }
166166
167167 code += `\nexport default component.exports`
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ const baseConfig = {
4343}
4444
4545function genId ( file ) {
46- return hash ( path . join ( 'test' , 'fixtures' , file ) )
46+ return hash ( path . join ( 'test' , 'fixtures' , file ) . replace ( / \\ / g , '/' ) )
4747}
4848
4949function bundle ( options , cb , wontThrowError ) {
You can’t perform that action at this time.
0 commit comments