Skip to content

outputOptions.pathInfo = true breaks sourcemaps #814

@randypuro

Description

@randypuro
  • Operating System:
  • Node Version:
  • NPM Version:
  • webpack Version: 5.51.1
  • mini-css-extract-plugin Version: 2.2.0

Expected Behavior

Source map line numbers are correct, even with outputOptions.pathinfo is true

Actual Behavior

#783 adds a 3 line comment block to the top of the output; so source map line numbers are all off by 3

Code

How Do We Reproduce?

With a sourcemapped setup, click on a css class link in browser dev tools, and notice that the link shows the wrong line in the source.

Metadata

Metadata

Assignees

No one assigned

    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