-
-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Bundling Atrament with vite shows warning: #103
Comments
@ak37165 thanks for the report! I suspect it's to do with the Rollup plugin for Web Workers: https://github.com/darionco/rollup-plugin-web-worker-loader/blob/master/src/helper/node/WorkerClass.js it's technically not importing I'll try to find a way to eliminate the warning, it would actually be pretty nice if this code never entered the bundle. Does fill mode work in your application? |
I'm seriously considering splitting out Fill Mode into a separate package and letting the developer create their own Worker with it. Firstly, there's probably lots of apps that don't require it, and secondly, bundling it has been causing issues all the time 😬 |
I am not using fill mode (and have not tried it yet). Using atrament for the smooth drawing and that works great! Separating out seems like a good design choice. Many apps already use a worker and can integrate with that if they need to use fill mode. |
Thanks for the fast fix! The warning does not show up anymore. |
I am using atrament in a client side project bundled using vite. It shows warning
Module "worker_threads" has been externalized for browser compatibility. Cannot access "worker_threads.Worker" in client code
VITE documentation for the warning is here: https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility
I am not sure I understand fully but looks like some Node.js module expected to be used only on the server side is being used?
The text was updated successfully, but these errors were encountered: