Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit acaf6a6

Browse files
committedDec 31, 2017
fix: fix sourceMap lines off
1 parent d8094e7 commit acaf6a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎lib/parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function generateSourceMap (filename, source, generated, sourceRoot) {
4949
map.addMapping({
5050
source: filename,
5151
original: {
52-
line: index + 1,
52+
line: index,
5353
column: 0
5454
},
5555
generated: {

1 commit comments

Comments
 (1)

ArtemGovorov commented on Jan 18, 2018

@ArtemGovorov

@yyx990803 The change had broken one use case. If you for example have a source file starting with a script and a source line on the same line with the opening tag, for example:

<script>import Hello from './components/Hello'

export default {
  name: 'app',
  components: {
    Hello
  }
}
</script>

then the loader doesn't work anymore. It used to work fine before the change.

Please sign in to comment.