d-markey / squadron_builder

Dart code generator for Squadron workers. Implement your worker service and let squadron_builder bridge the gap with Web Workers and Isolates!
https://pub.dev/packages/squadron_builder
MIT License
15 stars 3 forks source link

WASM: generated *web.g.dart should use Uri.parse #16

Closed jpohhhh closed 2 months ago

jpohhhh commented 2 months ago

Running squadron and squadron_builder at HEAD will generate web.g.dart with a getActivator() method that returns a String. However, web builds expect it to return a URI.

For my case, simply wrapping the String returned by get*Activator() in Uri.parse fixed it.

(along with noting where dhttpd 404'd on files, and moving them there, but AFAIK that's a client problem, not something the package can address)

d-markey commented 1 month ago

Version 6 is available, please refer to Squadron's changelog for breaking changes.

URIs are now parsed with Squadron.uri(). You can use URIs of he form "~/workers/service.web.g.dart.js" and "~" will be replaced with the location of your flutter app (eg if it in deployed in "/some/where", it will expand to "/some/where/workers/service.web.g.dart.js").