schultek / jaspr

Modern web framework for building websites in Dart. Supports SPAs and SSR.
https://jasprpad.schultek.de
MIT License
1.01k stars 59 forks source link

fix: Flutter plugin interop does not work on client only app #183

Closed walsha2 closed 4 months ago

walsha2 commented 4 months ago

Description

Flutter plugin interop crashes for client only jaspr app. The application fails to serve.

Steps To Reproduce

COMPLETE EXAMPLE: https://github.com/walsha2/jaspr-issues/tree/firebase-auth

Example issue with the following packages:

firebase_auth: ^4.17.9
firebase_core: ^2.27.1

The custom web compilers are added:

jaspr_web_compilers: ^4.0.7+1

Starting from a clean jaspr create project, simply add these dependencies and attempt to run jaspr serve. In this example (repo linked above), I have created two applications:

app_client
app_ssr

The client app does not work, it looks like the main.dart.js file is not being generated.

GET http://localhost:5833/main.dart.js net::ERR_ABORTED 404 (Not Found)

The SSR app does work. So this is a client app only issue.

schultek commented 4 months ago

I published jaspr_web_compilers v4.0.9 which should fix this issue.

walsha2 commented 4 months ago

I think that is indeed the case! I can now use firebase_auth and firebase_core. I have not done anything too fancy yet, but I did confirm I can load an app instance and call the firebase auth instance.

Thanks for working this. Closing issue.