-
Notifications
You must be signed in to change notification settings - Fork 171
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
Polyfills or fallbacks for browser use with Webpack 5 #237
Comments
ahocevar
changed the title
Polyfills or fallbacks for browser use
Polyfills or fallbacks for browser use with Webpack 5
Sep 10, 2021
Is #234 also relevant? |
@kasugaiasuka Oh yes, #234 will probably fixe this issue. Thanks for reporting that! |
thomasleese
added a commit
to ministryofjustice/hmpps-book-secure-move-frontend
that referenced
this issue
Sep 22, 2021
This fixes an issue with ol 6.7 which uses geotiff. See openlayers/openlayers#12729 (comment) for the suggested fix and geotiffjs/geotiff.js#237 for the original problem.
I can confirm that version 1.0.6 fixes my project that's using vite and openlayers (and geotiff as a dependency of openlayers). Just ran into this yesterday, so it's wonderful to see the fix land already. |
@ahocevar I think we can close this issue, right? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When compiling an application that depends on geotiff.js with Webpack 5, Webpack complains about missing poyfills or fallbacks for http, https, fs and url.
For fs it should be 100% safe to add a fallback. For http, https and url, a polyfill might be required, depending on if/how it is used in a browser environment. I have not checked that though.
Assuming a fallback is fine for all these dependencies, it would be sufficient to add the following to
package.json
:This is related to #98.
The issue came up in openlayers/openlayers#12729.
A dependency of geotiff.js, readable-stream, has the same problem. See nodejs/readable-stream#448 for the ticket there, which also helps a bit in understanding the problem.
The text was updated successfully, but these errors were encountered: