Skip to content

Source maps generation adds broken intermediate code #1400

Open
@rjgotten

Description

@rjgotten

Version

15.4.1

Reproduction link

https://github.com/NetMatch/vue-loader-testcase

Steps to reproduce

  1. Clone the linked repository
  2. Execute npm ci
  3. Execute npm run build
  4. Inspect the generated source maps in the dist folder

What is expected?

vue-loader generates source maps for the source Vue SFC file and the constituent template, style and script sections.

The appendExtension option is honored and the source map lists the constituents as Example.vue.html, Example.vue.css and Example.vue.js.

What is actually happening?

vue-loader generates source maps for intermediate stages of generated JS code rather than the original sources of the template, style and JS sections.

The appendExtension option is not honored. All generated files are generated under the Example.vue name and are disambiguated by adding part of their content hash as a suffixed query string.


Same issue as in #1163 where the root cause was claimed to be Babel and should have been resolved with latest versions of all build tools. However, the test case presented here uses the latest versions of Webpack and vue-loader and doesn't even use Babel at all. And still has this problem.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions