DioxusLabs / dioxus

Fullstack GUI library for web, desktop, mobile, and more.
https://dioxuslabs.com
Apache License 2.0
19.33k stars 736 forks source link

Bootstrap in dioxus cli from path leads to issue whereas url is fine #2178

Closed XavDesbordes closed 3 months ago

XavDesbordes commented 3 months ago

Hi, Dioxus @0.5

when using dx new and setting the app, we can later add css and js script:

Excerpt of my Dioxus.toml:

# CSS style file

style = ["/path/to/bootstrap.min.css"]

# Javascript code file
script = ["/path/to/bootstrap.bundle.min.js"]

When using bootstrap from my file system, chrome tells me Uncaught SyntaxError: Unexpected token '<'

but from the cdn (which is the same file I downloaded locally)

# CSS style file

style = ["https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"]

# Javascript code file
script = ["https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"]

No error message, and it runs as expected.

Anything I missed ?

Thanks,

XavDesbordes commented 3 months ago

Ok, We have to put the files in the asset or dist folders for it to work. Solved!