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

Error importing immer library because of source maps #367

Closed
Ventajou opened this issue Sep 4, 2020 · 1 comment
Closed

Error importing immer library because of source maps #367

Ventajou opened this issue Sep 4, 2020 · 1 comment

Comments

@Ventajou
Copy link

Ventajou commented Sep 4, 2020

Trying to build a project that uses the immer library (https://www.npmjs.com/package/immer) and I'm getting the following error:

../node_modules/immer/dist/immer.module.js.map:1:177: error: The value for the "sourcesContent" field must be an array
..../src/scope.js","../src/es5.js","../src/proxy.js","../src/patches.js","../src/immer.js","../src/index.js"],"sourcesContent":null,"names":["NOTHING","Symbol","DRAFTABLE","for","const","DRAFT_STATE","isDraft","value","isDraftable","...

Since we don't have control over 3rd party libraries, is there a way to maybe just ignore their sourcemaps if invalid?

@rtsao
Copy link
Contributor

rtsao commented Sep 4, 2020

For this particular library, it seems this was fixed: immerjs/immer#489

I suppose it would make sense to just ignore invalid source maps and issue a warning.

@evanw evanw closed this as completed in ae14f5c Sep 4, 2020
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

No branches or pull requests

2 participants