You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 26, 2018. It is now read-only.
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 <style> section from item.vue then browser show error at correct line. So I think there is a some problem with vueify and style section. Moving style section after template or after script did not solve this issue.
index.html
<!doctype html><html><head><title>Test vueify source map incorrect line bug</title></head><body><divid="item"></div><scriptsrc="build.js"></script></body></html>
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 ofconsole.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 <style> section from item.vue then browser show error at correct line. So I think there is a some problem with vueify and style section. Moving style section after template or after script did not solve this issue.
index.html
main.js
item.vue
The text was updated successfully, but these errors were encountered: