Improve documentation for build tool integration #72
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Fleshes out the documentation to include more information on how to integrate Loam with build tooling, which has been a common pain-point for users. Includes an explicit example for create-react-app, since it's what we often use and is fairly popular.
Notes
Build tooling support for WebAssembly and Web Workers is astonishingly poor right now, and it's even worse for libraries because you can't rely on any specific build tool or version of a build tool being available. There are decent solutions for developers who are writing and managing their own Web Workers and/or WebAssembly within their own app, but I haven't found much help if you want to integrate 3rd-party Web Workers or WebAssembly into an app, which is what Loam essentially asks developers to do.
It seems like the build story would be much easier if Loam didn't provide a web-worker-based API, and forced developers to figure that part out themselves, but you'll almost always want to run GDAL on a separate thread, so that would in effect force every developer to re-invent roughly the same Web Worker communication code (or copy-paste a "blessed" template file into their project source). That seems even worse than the current problems with build tool integration, which make things kind of clunky but aren't insurmountable obstacles.
Hopefully improving the documentation, plus addressing #71 and #58, will smooth off enough rough edges that we can sit tight until the rest of the ecosystem catches up, but if there are any other approaches that I'm not thinking of, I'd love to hear them!
Testing Instructions
Checklist
Resolves #68 and/or #62 (both of which were closed by their creators, but hopefully this will prevent other people from having similar trouble).