File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
Filter options
Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ var component = normalizer(
177
177
? JSON . stringify ( filename )
178
178
// Expose the file's full path in development, so that it can be opened
179
179
// from the devtools.
180
- : JSON . stringify ( rawShortFilePath )
180
+ : JSON . stringify ( rawShortFilePath . replace ( / \\ / g , '/' ) )
181
181
} `
182
182
183
183
code += `\nexport default component.exports`
Original file line number Diff line number Diff line change 1
- const path = require ( 'path' )
2
1
const { SourceMapConsumer } = require ( 'source-map' )
3
2
const normalizeNewline = require ( 'normalize-newline' )
4
3
const MiniCssExtractPlugin = require ( 'mini-css-extract-plugin' )
@@ -50,7 +49,7 @@ test('expose file path as __file outside production', done => {
50
49
mockBundleAndRun ( {
51
50
entry : 'basic.vue'
52
51
} , ( { module } ) => {
53
- expect ( module . __file ) . toBe ( path . normalize ( 'test/fixtures/basic.vue' ) )
52
+ expect ( module . __file ) . toBe ( 'test/fixtures/basic.vue' )
54
53
done ( )
55
54
} )
56
55
} )
You can’t perform that action at this time.
0 commit comments