Skip to content
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

Harder debugging/troubleshooting because /src is excluded by .npmignore #785

Closed
justingrant opened this issue May 7, 2019 · 0 comments · Fixed by #761
Closed

Harder debugging/troubleshooting because /src is excluded by .npmignore #785

justingrant opened this issue May 7, 2019 · 0 comments · Fixed by #761

Comments

@justingrant
Copy link

popper.js publishes sourcemaps to NPM but the sources list in popper's sourcemap files points to a /src folder that's missing from NPM installs, because that folder is excluded by .npmignore.

This causes a few problems:

  • It's harder for users to navigate from source on GitHub to the corresponding source in their local dev environment, or vice-versa.
  • The source that users see during a debug session (which is the code stored in the source map file itself) is different from the bundled code that users see before or after a debug session. This difference leads to problems like confusion about where to set breakpoints (original source? bundle source? etc.), or difficulty setting breakpoints on first load (where the sourcemap source isn't available yet).
  • Tools that check for errors in source maps will report warnings if source files listed in the sourcemap aren't present on disk. I'm biased because I'm working on one of these tools now. ;-) FWIW, out of hundreds of NPM libraries that I've run through this tool, a few other libraries had the same problem, but they've all been fixed over the last few months.

I built a trivial PR #761 that adds /src to the .npmignore whitelist so that actual source will be included in the npm package. Let me know if there's any way I could help get this PR merged.

P.S. - Thanks for building popper.js... it's a great library! I use reactstrap heavily and although I've had lots of challenges with the Bootstrap parts, I've never had any problems with popups! ;-)

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

Successfully merging a pull request may close this issue.

1 participant