Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ var component = normalizer(
? JSON.stringify(filename)
// Expose the file's full path in development, so that it can be opened
// from the devtools.
: JSON.stringify(rawShortFilePath)
: JSON.stringify(rawShortFilePath.replace(/\\/g, '/'))
}`

code += `\nexport default component.exports`
Expand Down
3 changes: 1 addition & 2 deletions test/advanced.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const path = require('path')
const { SourceMapConsumer } = require('source-map')
const normalizeNewline = require('normalize-newline')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
Expand Down Expand Up @@ -50,7 +49,7 @@ test('expose file path as __file outside production', done => {
mockBundleAndRun({
entry: 'basic.vue'
}, ({ module }) => {
expect(module.__file).toBe(path.normalize('test/fixtures/basic.vue'))
expect(module.__file).toBe('test/fixtures/basic.vue')
done()
})
})
Expand Down