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

Documentation example is misleading for using hidden source maps #69

Closed
imperio59 opened this issue Dec 4, 2019 · 1 comment · Fixed by #78
Closed

Documentation example is misleading for using hidden source maps #69

imperio59 opened this issue Dec 4, 2019 · 1 comment · Fixed by #78

Comments

@imperio59
Copy link

I was trying to use this plugin to upload my source maps during deployment, after which I deleted them before uploading my app to my server.

The issue is that with the example config on the README file, comments get inserted into the generated JS bundles with the URL of the source map. This makes the source maps public (which is generally a bad idea) and defeats the whole purpose of using this plugin to upload them to rollbar.

What's required in addition to the example config is to add the following so webpack doesn't emit comments with source map URLs in the bundled files, and so rollbar will use the files uploaded by the plugin instead of trying to re-download them when an error fires:

devtool: 'hidden-source-map',

This is documented here: https://survivejs.com/webpack/building/source-maps/#devtool-hidden-source-map-

Can you please update your README to add this line in the sample config with a comment about its relevance? Thanks!

@brandondoran
Copy link
Collaborator

Good point. I will update the usage example and include more documentation on the importance of hidden-source-map.

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.

2 participants