fastify / fastify/fastify-static

Wildcard glob support

Open
#178 10 comments 0 reactions 0 assignees View on GitHub
good first issue semver-minor
Dominant language
JavaScript
Stars
500
Forks
129
Avg merge
2m
Merged PRs (30d)
1

Description

It looks like passing a glob to wildcard was a breaking change in the 4.x release (https://github.com/fastify/fastify-static/pull/175), but it's unclear why it was removed. It's an extremely valuable feature and something I've used across multiple applications. Is it possible to revert that change and keep the functionality, or is there a workaround to keep similar behavior without having to rework directory structures?

For one of the use cases specifically, by using globs, it's possible to keep static assets next to the relevant code they're used with rather than having to maintain a separate assets directory. It's in a similar vein of keeping your tests next to the code versus having a separate tests directory, etc.

It'd be awesome to keep this functionality if there wasn't a strong reason to remove it.

EDIT: I did see that https://github.com/fastify/fastify-static/pull/172 was added, but wasn't sure if that would actually allow the same behavior or if there were differences.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.