First, I want to capture .vue file errors from source code in production environment. So i used the vuePlugin like this
// main,js
import Vue from 'vue'
import Raven from 'raven-js'
import RavenVue from 'raven-js/plugins/vue'
Raven
.config('my client DSN')
.addPlugin(RavenVue, Vue)
.install()
and it works but the reports aren’t my expectation
My source code in .vue file which i throw test error is at line 36
34 | methods: {
35 | error() {
36 | throw new Error('test throw error from .vue file')
37 | }
38 | }
However,i got my report at my own server look like this
99 | methods: {
100 | error: function error() {
101 | throw new Error('test throw error from .vue file');
102 | }
103 | }
It is a wrong line.
My webpack config devtool option is ‘source-map’
I guess the source-map is the source code after converted by vue-loader and some babel-loaders, now i want the source code report is before converted, how do i fix this? thanks a lot!