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?
Repository: developit/workerize-loader. Description: ๐๏ธ Automatically move a module into a Web Worker (Webpack loader) Stars: 2314, 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 (3y ago). Open PRs: 6, open issues: 22. Last activity: 3y ago. Community health: 28%. Top contributors: developit, jaikme, greenkeeper[bot], yellott, QingWei-Li, dpraimeyuu, danielbayerlein, danieldunderfelt, wellcaffeinated, kenrick95 and others.
JavaScript
Used to be the case with Webpack 4 that we could pass as the name template for workerize-loader to use; and we'd get workers output into a folder structure mirroring their original source location. This was nice for debugging purposes to easily identify workers, because the entry point file for esp. larger workers is usually some kind of file. means you don't need to inspect every separate worker named - and it prevented name collisions when you would generate names in development builds without hash fingerprints in them. As of Webpack 5, that functionality appears to be broken. It resolves and just fine, but doesn't know how to deal with . I'm using a plugin to dynamically inject options into loaders to configure bare loader URLs such as centrally, and luckily I was able to extend the logic there to use the current compilation context and module context to compute a relative path, but yeah... _this_ is not very ergonomic, easily understood or maintainable: compared to what it _used_ to be:
Related to issue #3
Hi, with webpack@4.14.0, I'm unable to get this loader working. It throws an error at build time! I can see _compilation in the deprecated properties in the loader API https://webpack.js.org/api/loaders/#deprecated-context-properties Maybe it has been removed completely in the latest webpack versions ?? Here's what gives when I console.log(this._compilation) Hope to hear from you guys! Thanks for this awesome package!