Skip to content

Sourcemap paths fail because of overriden sourceMap option. #484

@ghost

Description

I have a folder structure like this:

  • <Project root>
    • Assets
      • css
        • bundles
        • modules

Webpack is run from <Project root> with the config file residing in <Project root>/Assets

In normalizeOptions.js the sourceMap option is overriden like this:

options.sourceMap = path.join(process.cwd(), "/sass.map")

All SourceMap paths of imported files look like this:
./Assets/css/bundles/Assets/css/modules/utils/_mixins.scss
This is very wrong.

If i comment out that line and set sourceMap option manually, i can get sourceMaps to work:

loader: "sass-loader",
options: {
  sourceMap: path.resolve(__dirname, "css/bundles/bundle.css")
}

SourceMap paths now look correct:
./Assets/css/modules/utils/_mixins.scss

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