[BUG] leptos template fails with `/pkg/.js` not found
Is there an existing issue for this?
- [x] I have searched the existing issues
What version of workers-rs are you using?
0.7.5
What version of wrangler are you using?
4.76.0
Describe the bug
Fails with GET /pkg/.js 404 Not Found
...
[custom build]
⎔ Starting local server...
[wrangler:info] Ready on http://localhost:8787
[wrangler:info] GET / 200 OK (75ms)
[wrangler:info] GET /pkg/.js 404 Not Found (7ms)
[wrangler:info] GET /pkg/<my-pkg>.css 200 OK (18ms)
[wrangler:info] GET /pkg/_bg.wasm 404 Not Found (14ms)
[wrangler:info] GET /favicon.ico 200 OK (3ms)
Browser console:
Loading module from “http://localhost:8787/pkg/.js” was blocked because of a disallowed MIME type (“”).
Steps To Reproduce
cargo generatewithtemplates/leptos(nightly=true)- run either
npx wrangler devornpx wrangler deploy - navigate to site (
GET /pkg/.js 404) - button do not work
I think it’s this change that broke the paths. Without it, the template works correctly.
@Sushi-Mampfer, what was the rationale for it?
I think it’s this change that broke the paths. Without it, the template works correctly.
@Sushi-Mampfer, what was the rationale for it?
I didn't throughly test the change, I couldn't find any reference to the env in the code and on my test project I still had the env set and the template compiles without it. On windows the syntax for setting the env isn't valid, and because I thought it served no purpose I removed it. I can make a pr with a fix that works for unix and windows(it would require another question when using the template) or the commit could be reverted(which won't work out of the box for windows).