eleventy
eleventy copied to clipboard
eleventy --serve adding trailing slash to manifest.json
Describe the bug
When running eleventy --serve for local development if I try to access my manifest.json I get a 301 redirect to /manifest.json/ (i.e. including a trailing slash) which then errors.
To Reproduce Steps to reproduce the behavior:
- Run
npx @11ty/eleventy --serve - Go to
https:localhost'8080/manifest.json - See error
Expected behavior
The manifest.jsonshould be served
- OS and Version: Mac OS 11
- Eleventy Version: 1.0.1
@heath3 I'm unable to reproduce that locally on macOS 12.4 w/ [email protected]: https://github.com/pdehaan/11ty-2484
npm run serve
> [email protected] serve
> eleventy --serve
[11ty] Writing www/index.html from ./src/index.njk
[11ty] Writing www/manifest.json from ./src/manifest.njk
[11ty] Wrote 2 files in 0.04 seconds (v1.0.1)
[11ty] Watching…
[Browsersync] Access URLs:
-------------------------------
Local: http://localhost:8081
External: http://false:8081
-------------------------------
[Browsersync] Serving files from: www
And if I navigate to http://localhost:8081/manifest.json locally, it seems to show me my fake manifest JSON file:
{
"generator": "Eleventy v1.0.1"
}
Hi @heath3,
did you set a permalink in your manifest.json or have it set as a passthrough copy? By default it might be interpreted as a template or not even picked up correctly.
What files do you see in your output folder and does it work correctly when running in "normal" build mode?
It's just a .json file which is copied over via addPassthroughCopy. I hadn't checked in on it in a while and I may well have made changes in the meantime but it appears to be working just fine now in --serve mode so I'll close. Thanks.