d-markey / squadron

Multithreading and worker thread pool for Dart / Flutter, to offload CPU-bound and heavy I/O tasks to Isolate or Web Worker threads.
https://pub.dev/packages/squadron
MIT License
79 stars 0 forks source link

Web: Error: No 'main' method found. #38

Closed devfelipereis closed 1 month ago

devfelipereis commented 1 month ago

Hello! I'm testing your lib and it's working fine for desktop (macOS). Now I'm trying for the web but I got this error:

image

Any ideas?

Dart SDK version: 3.3.4 (stable) (Tue Apr 16 19:56:12 2024 +0000) on "macos_arm64"

devfelipereis commented 1 month ago

I got it. I'm using squadron_builder and I called:

❯ dart compile js lib/workers/theme_service_worker.web.g.dart -o web/theme_service_worker.dart.js