Skip to content

Breaks absolute file paths for source map filename templates #480

@chrisnicola

Description

@chrisnicola

I'm submitting a bug report

Webpack Version:
Tested with 2.x and 3.0.0

Babel Core Version:
6.25.0

Babel Loader Version:
7.1.0

Please tell us about your environment:
OSX 10.x

Current behavior:

If I look at the values passed to output.devtoolModuleFilename for files parsed through babel-loader have a non-relative and non-absolute value. Basically the values for resource, resourcePath and absoluteResourcePath are all the same.

Specifically if I have a file at ./src/main.js I will get

resource: src/main.js
resourcePath: src/main.js
absoluteResourcePath: src/main.js

Expected/desired behavior:

Files that are not passed through babel-loader have the following information:

resource: src/main.js
resourcePath: ./src/main.js
absoluteResourcePath: /Usrs/someone/dev/project/src/main.js

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem along with a gist/jsbin of your webpack configuration.

Using babel-loader you can debug this by setting output.devtoolModuleFilename to a console logging function and viewing the results.

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