Webpack Worker#3
Open
robcmills wants to merge 14 commits into
Open
Conversation
commit 5305329 Author: Robert Mills <robcmills@gmail.com> Date: Sun May 24 12:36:31 2020 -0700 Begine implementing action to download a bulk data object This commit surfaces the failure of an inline worker to import external modules, under the umbrella of CRA's webpack config. At this point it looks like we will have to either fork CRA or start rolling our own build config. commit d599313 Author: Robert Mills <robcmills@gmail.com> Date: Mon May 18 21:52:03 2020 -0700 Add basic proof of concept
This commit finally cobbles together a working POC that includes a worker module written in typescript that can import other modules. One example usage is implemented partially, the downloadBulkDataObjectWorkerAction that kicks off a "worker job" to download bulk data and hydrate it into indexedDB.
With progress actions dispatched back to main thread
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Unfortunately CRA does not support web workers. Workers are integral and essential to the architecture of serverless magic, aka Hexproof.net
So this PR introduces our own custom webpack config to support them via workers-loader.
CRA was a good tool to bootstrap this project and get started, but now we are moving away from it in favor of rolling our own config.