-
-
Notifications
You must be signed in to change notification settings - Fork 40
[how-to] use workers with webpack #229
Comments
@danielgek Yes I've been through those posts, but it's unclear if it is a bug or something else, and it seems to me untrackable for the next people who will try to find out how to use workers with webpack. As of today, we can't send in production new version of our application for this very single reason :( |
I'd be glad if I could have any kind of workaround 🆘 |
Currently i don't have any workaround for this and i think the team hasn't too(@Pip3r4o) i actually have shipped the app i'm working on w/o AOT :( |
@danielgek sadely that's impossible for us to do so. I'll wait untill next week for our next release, hopping it will get back to work 🙏 |
I've read to all the issues and found this commit. If I know use
|
Any update on this ? |
Still nothing on this ? |
@echap we are committed to addressing the problem in the 3.2 release. We'll let you know when it's fixed. There are no workarounds currently, except to avoid importing tns-core-modules, or plugins depending on these inside your worker script. |
@Pip3r4o a work around for me can be found here https://github.com/TeamMaestro/nativescript-pspdfkit/blob/master/src/ios/pspdfkit.ts#L50-L56 after installing the modifed worker-loader in my repo |
@triniwiz Is this working only for ios ? (since your chances are here ?), Haven't tried it yet ! |
@echap it works for both platform |
You can now use the nativescript worker-loader. You can find more info and demo apps in the repo of the plugin: https://github.com/nativescript/worker-loader. The plugin is also included in the default webpack configuration that the nativescript-dev-webpack plugin adds. |
I am trying to use a webworker within my project for background computation purposes.
here are my versions :
When I was using {N} 2.5.5, I had a system built like that :
globals.isAoT
that I used to set in mymain.ts
andmain.aot.ts
and checked in my worker instanciationAnd is was working well.
With {N} 3.1.1, I dropped usage of the
globals
variable, but all the rest is still the same but this is not working anymore.The issue is :
My question then is, how am I supposed to use my webworker with {N} 3.1.1 webpacked ? Thanks a lot !
The text was updated successfully, but these errors were encountered: