๐๏ธ Automatically move a module into a Web Worker (Webpack loader)
by developitJavaScript
Last 12 weeks ยท 0 commits
1 of 6 standards met
It seems like after I start the Gatsby dev server a second time โ and webpack has a cache โ the worker doesn't load with the exported worker functions set on the object. The moment I clear webpack's cache and restart the dev server, the worker loads fine again. Does this very limited description by any chance give you a quick insight about what might be causing this? I'm afraid I can't really give more details, because the inner workings of gatsby/webpack is just one big black box to me. I can of course make a minimal reproduction with a newly bootstrapped gatsby, if this would be of any help?
Expands on/supersedes #100. Removing the parser logic simplifies the webpack API integration and number of points that break as a result of webpack 5 changes. Note that karma-webpack would not play nicely when I installed webpack 5, so while this appears to compile correctly, it has not been tested at runtime with Webpack 5. Possible fix for #77
Adds support for field appears to be around for all of Webpack 4. If prior webpacks are supported still, then will need a simple adapter layer. Approached this in additive fashion to reduce the risk of this PR. I do have a stash locally that replaces the custom traversal logic glad to include that in this PR if desired. Mostly deletes the custom parser hooks. Fixes #15
Repository: developit/workerize-loader. Description: ๐๏ธ Automatically move a module into a Web Worker (Webpack loader) Stars: 2306, Forks: 85. Primary language: JavaScript. Languages: JavaScript (100%). Homepage: https://npm.im/workerize-loader Topics: web-worker, webpack, webpack-loader, webpack-plugin, worker. Latest release: 2.0.0 (4y ago). Open PRs: 3, open issues: 22. Last activity: 4y ago. Community health: 28%. Top contributors: developit, jaikme, greenkeeper[bot], yellott, QingWei-Li, dpraimeyuu, danielbayerlein, danieldunderfelt, wellcaffeinated, kenrick95 and others.