vuejs / vueify

Browserify transform for single-file Vue components
MIT License
1.17k stars 152 forks source link

Browsers show incorrect line of error in source for .vue files #232

Open nolimitdev opened 6 years ago

nolimitdev commented 6 years ago

Browsers show incorrect line of error in source for .vue files. It is incorrect for one line. See very simple example below. All files are stored in root for this example. Im using latest versions of browserify, vue and vueify.

Create files manually as listed below (or download ready to use app) and run commands: $ npm install -g browserify $ npm install vue vueify babel-core babel-preset-es2015 babel-plugin-transform-runtime $ browserify --debug -t vueify -e main.js -o build.js

Open app in web browser and in console run: main.test() ... Uncaught ReferenceError shows correct line causing error: console.log(sthUndefined);

item.test() ... Uncaught ReferenceError shows incorrect line causing error: test : function() { instead of console.log(sthUndefined);

So lines from main.js are correct in source maps (so browserify does it job fine) but lines from .vue file are incorrect. When I remove