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

Sourcemap Loader Crashes Webpack #65

Closed
egucciar opened this issue Jun 21, 2018 · 3 comments
Closed

Sourcemap Loader Crashes Webpack #65

egucciar opened this issue Jun 21, 2018 · 3 comments

Comments

@egucciar
Copy link

Hello!

How can i get this error to stop crashin webpack?

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
     /node_modules/source-map-loader/index.js:53:22

this happens quite frequently. I am unsure of the reason why. but, thats how it is.

Instead of crashing, id like it to emit no error, and then try again on any file change.

@alexander-akait
Copy link
Member

@egucciar feel free to send a PR

@fimius23
Copy link
Contributor

I'm having issues with this too. Intermittently when webpack 4 builds my source maps the file ends with an extra "} which makes it malformed JSON. Seems like this library should consider wrapping the JSON.parse() on the line mentioned above in a try/catch, so a malformed map doesn't stop execution in its tracks.

alexander-akait pushed a commit that referenced this issue Jul 18, 2018
* fix: Handle exception on loading invalid source maps (#65)

* test: now has test for warning when invalid source map
@michael-ciniawsky michael-ciniawsky added this to the 0.2.4 milestone Aug 14, 2018
@alexander-akait
Copy link
Member

Fixed in master

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

No branches or pull requests

4 participants