I’m trying to use components.html to load a local HTML file, but including CSS and JavaScript files in it throws an error “Failed to load resource: the server responded with a status of 404 (Not Found)” as it’s trying to access “http://localhost:8501/bootstrap.min.css” instead of the bootstrap.min.css in the local folder. Any idea how to solve this?
On a side note, is there any way to use bi-directional components without React or TypeScript? Or is rewriting an HTML site to those formats the only way?
CDNs seem to solve the problem for CSS and js scripts, but it seems like the problem also persists for local files like images and videos as well, which is still an issue.
The last 2 links require some form of TypeScript, hence prompting me to ask the question. The first link looks to be what I’m looking for though, I’ll give it a look!
Cool! It works well, I’ve used it a bit and I know another creator that loves this way of doing eheh we can namedrop if you have issues with the non typescript way.
Also you can absolutely do the reactless component in vanilla JS, no Typescript (rename to .js and remove any sign of types from the file), only the npm part will be required.
That does solve the issue, thanks. However, I’m trying out the implementation without any frontend tooling, and that method does not call components.html, so I’m unsure how to access the static videos for that.
Also, using CDNs are fine for external CSS and JS files, but what about local CSS files I made myself? Do I need to try to host them online and convert them to a CDN in order to implement them?
That would be great! The solution has been working decently well for me, other than a few issues such as video controls being weird. I would love to have more references on this way of implementing it.