Skip to content

Namespacing #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
QuentinRoy opened this issue Aug 16, 2017 · 2 comments · Fixed by #100
Closed

Namespacing #51

QuentinRoy opened this issue Aug 16, 2017 · 2 comments · Fixed by #100

Comments

@QuentinRoy
Copy link

If several vendor's source map use the same file-name or the same root directory, only one of them shown in Google Chrome (I haven't tested it with other browsers).
This might be an issue in particular as some directories are very common—e.g. src.
Note that the source map is still here (you can find it by stepping into the corresponding function for example), it is just not shown in the sources pane.
I honestly don't know how source-maps work behind the scene, but I am wondering if it would be possible to add a prefix to the source map? Or making it appears in a directory with the name of the imported file?

@AlexanderOMara
Copy link

AlexanderOMara commented Dec 5, 2017

This issue has been bugging me for a while.

When it loads existing source maps (from node_modules for example) the path is preserved, you can end up with multiple source maps at the same path.

So if you have multiple files with a source map like this:

{
...
  "sources":["src/index.js"],
...
}

You end up with a source map listing only one of those files like (thus mapping is lost):

{
...
  "sources" : [
    "webpack:///webpack/bootstrap 935da6b8229a50276409",
    "webpack:///./main.js",
    "webpack:///src/index.js"
  ],
...
}

This is very unpleasant, and makes loading sources from outside your own code basically unusable.

It would be nice if there was some way to namespace or remap those sources somehow. Perhaps by resolving the path relative to the actual file path?

@pixeldrew
Copy link

pixeldrew commented Jul 24, 2018

I'm unable to identify how to namespace the input sources, anything named index.js is overwritten and all of the paths are output under a blank webpack entry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants