Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

Sourcemap issue with beta.48 #849

Open
ArmorDarks opened this issue May 4, 2018 · 5 comments
Open

Sourcemap issue with beta.48 #849

ArmorDarks opened this issue May 4, 2018 · 5 comments

Comments

@ArmorDarks
Copy link

ArmorDarks commented May 4, 2018

JSPM 0.17.0-beta.48 (Windows 10) seems to introduce issue woth sourcemaps.

Here is how it looks before beta.48 on Windows (note the issue with paths, described in #845):

{
  "version": 3,
  "sources": [
    "jspm_packages/npm/jquery@3.3.1/dist/jquery.js",
    "src/file:/J:/_DEL_JSPM_TEST/src/dep.js",
    "src/file:/J:/_DEL_JSPM_TEST/src/app.js"
  ],
  "names": [...],
  "mappings": "...",
  "file": "build.js"
}

beta.48 fixed issue with paths on Windows, but now source map does not include package internal dependencies — only package itself and jspm_packages dependencies:

Here is how it looks with beta.48:

{
  "version": 3,
  "sources": [
    "jspm_packages/npm/jquery@3.3.1/dist/jquery.js",
    "src/app.js"
  ],
  "names": [...],
  "mappings": "...",
  "file": "build.js"
}
@ArmorDarks
Copy link
Author

@guybedford
Copy link
Member

Are you sure this isn't the result of tree-shaking removing use of the dependency entirely?

@ArmorDarks
Copy link
Author

Well, at least it shouldn't.

src/dep.js explicitly imported by src/app.js with import './dep, and final bundle has code from dep.js, but just does not exist in sourcemaps

Here is console output:

ohnh8t0

I also have another very large projects with good amount local package dependencies, and it has same issue — they all no longer appear in sourcemaps with beta.48.

@guybedford
Copy link
Member

Odd, perhaps Rollup is just not outputting source maps dependencies that have invalid file paths?

@ArmorDarks
Copy link
Author

ArmorDarks commented May 4, 2018

Can't tell. The paths should be valid. I guess it would error about non-existing files if paths were invalid?

But I mostly certain it's an issue with Rollup.

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

No branches or pull requests

2 participants