webarkit / ARnft

A small javascript library for WebAR with NFT
GNU Lesser General Public License v3.0
219 stars 53 forks source link

Feature: Removing worker-loader and loading Worker with webpack5 #305

Open kalwalt opened 1 year ago

kalwalt commented 1 year ago

With webpack 5 it's possible to load a worker without using the worker-loader package. This PR try to adapt the code to this new standard. There is one issue, with this method the worker is not inlined as before: two files are created and must be loaded by the javascript code. As stated in this webpack issue there is no full support for inlining. An option it could be the workerize-loader package, and maybe i will implement this.