schultek / jaspr

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

fix: Document.file does not create the required client side JS bundle #185

Closed walsha2 closed 4 months ago

walsha2 commented 4 months ago

Description

Document.file(
  name: 'main.html',
  attachTo: 'body',
  child: App(),
),

Using Document.file does not create the required app.client.dart.js file.

Steps To Reproduce

Simply create a basic app using jaspr create and update lib/main.dart with the code above.

Other Notes

Using the following does work and will create the required app.client.dart.js file.

Document(
  body: App(),
),

Jaspr Doctor

[✓] Current Project
  • Dependencies on core packages:
    • jaspr: ^0.10.0
    • jaspr_builder: ^0.10.0
    • jaspr_riverpod: ^0.3.9
    • jaspr_router: ^0.3.1
  • Uses server-side rendering: true
  • Uses experimental compilers: false
  • Uses flutter embedding: false
schultek commented 4 months ago

Can you check if that still happens on main?

dependencies:
  jaspr:
    git:
      url: github.com/schultek/jaspr
walsha2 commented 4 months ago

Dependency Resolve (FYI)

Honestly, I have never really been able to get all the dependencies to be happy if I point to git directly. Your snippet above points to the jaspr_workspace, no? I think you meant to specify path: packages/jaspr. Anyway, when I try that I run into:

Because every version of jaspr_builder from git depends on jaspr from hosted and
app depends on jaspr from git, jaspr_builder from git is forbidden.

However, if I specify a dependency_overrides I can get the dependencies to resolve. So I did the following:

dependency_overrides:
  jaspr:
    git:
      url: https://github.com/schultek/jaspr.git
      ref: main
      path: packages/jaspr

Feedback

Can you check if that still happens on main?

@schultek YES this works on main. Nice, looks like this issue is already resolved and just needs to be published. I can close this item and await the next version release.