Skip to content

Source-maps not enabled by default  #1806

@lane-s

Description

@lane-s

Version

3.0.0-rc.3

Reproduction link

https://github.com/vuejs/vue-cli

Steps to reproduce

  1. Run vue create test-project
  2. Choose default options
  3. Change a .vue component so that the javascript code will throw an exception
  4. run npm run serve

What is expected?

The browser console should display the line number where the exception is being thrown in the .vue file

What 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:

module.exports = {
    configureWebpack: {
        devtool: 'source-map'
    }
}

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions