Open oscar-b opened 1 week ago
@oscar-b Thanks for reporting.
However without a repro this isn't really actionable (other than doing a speculative refactor of the worker-utils)
Also, does this actually break the build, or is it just a warning?
Also, does this actually break the build, or is it just a warning?
As far as I can see, it's only a warning. I don't know how I'd trigger the use of it though, or why it'd need spawn
in the browser?
I will see if I can setup a minimal repo with test, but it being just a warning might also be part of the issue I guess :)
why it'd need spawn in the browser?
- It doesn't.
- A design goal of loaders.gl is to create a library that works seamlessly in both Node.js and browsers.
- In some situation (workers in this case) that requires using different code paths.
- Getting various bundlers and Node to handle that gracefully in all cases is quite tricky, requires iteration and testing.
- Would cretainly love to remove this warning, but lots of higher priority work.
@ibgreen I see! Well it doesn't immediately seem to be causing issues, so this is most likely a quite harmless warning. I guess something like this could be used to filter out the warning if one would want to: https://vitejs.dev/config/shared-options.html#customlogger
I have a related problem: trying to build a Custom Layer in iife format so it can be used in/with pydeck results in:
https://rollupjs.org/troubleshooting/#error-name-is-not-exported-by-module
Probably related: #2000
My branch if anyone is interested: https://github.com/prusswan/deck.gl-pmtiles/tree/overture
Loader
"@loaders.gl/core": "^4.2.5",
Description
Expected Behavior
No response
Steps to Reproduce
Compile project with Vite
Environment
Logs
No response