-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Source-maps not enabled by default #1806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can't reproduce. vue-cli/packages/@vue/cli-service/lib/config/dev.js Lines 3 to 5 in e17f78c
|
What browser are you on? |
Chrome 67. The issue occurs consistently unless I add the config file I described. |
Cannot reproduce. Working as intended in Chrome 67. |
I'm having the same issue... |
Reproduced in Chrome 68. |
@lane-s Modifying vue.config.js as you instructed works for me My @vue/cli-service is @ 3.0.1 |
Hi, My Vue developer experience has been suffering due to terrible debugging/source maps: I've added:
Which helped (now when I Here's an example of a simple undefined error- and it NOT pointing to a file- Does the above look right? How come it doesn't tell me the line/file the error came from? |
No vue.config.js created here either. Latest vue-cli from npm, Linux Ubuntu 18.04 LTS. Reopen. |
Just create one. Not every initial configuration combination requires one, so it's not necessarily created for you. |
The right way to enable source-map module.exports = {
configureWebpack: (config) => {
config.devtool = 'source-map'
},
}; |
This config was pretty slow on file change, this one seems to be faster (we can also use the simpler object notation): module.exports = {
configureWebpack: {
devtool: 'eval-source-map',
}
} Found here: symfony/webpack-encore#214. More config for Webpack, didn't try others: https://webpack.js.org/configuration/devtool/
|
This was a huge help for me. Without I do have to note that |
@yarnball Has the problem been resolved? |
Any insight here? |
@nicooprat Which file? vue.config.js? Or a different file? |
I've noticed that sourcemaps are generated for my ts/js code, but are not generated if I use the |
I was seeing source maps in my production build, but not in my development build. Adding the config.devtool = 'source-map' into vue.config.js has fixed it so that I am now getting source maps in both prod and development. |
not sure if ultimately fixed but we have the same exact repro as @jomofrodo we're going to add the fix to all of our Vue components which are all built using now we're getting them in dev too (prod was always ok) w/ the workaround |
Version
3.0.0-rc.3
Reproduction link
https://github.com/vuejs/vue-cli
Steps to reproduce
.vue
component so that the javascript code will throw an exceptionnpm run serve
What is expected?
The browser console should display the line number where the exception is being thrown in the
.vue
fileWhat is actually happening?
The browser console displays an unhelpful error message referencing only
vue.runtime.esm.js
When creating a new project using vue-cli via create or UI, no vue.config.js file is created by default. In order to see the line number of an exception in your source code, you have to manually create
vue.config.js
and add the following:It seems to me that everyone would like to be able to source their errors, so I feel that this should be done by default.
The text was updated successfully, but these errors were encountered: