Skip to content

Allow to generate non-html files to a subfolder(s) #5270

@szimek

Description

@szimek

Gatsby generates all non-html files (e.g. *.js files, styles.css and chunk-manifest.json etc.) directly into public folder. However, there are some cases where it would be convenient to generate them into a subfolder, or subfolders.

I explained my use case in detail here: #2335 (comment), but the gist is that if one has more than one app available at the same path, e.g. /, it would make it much easier to write proxy rules for Gatsby apps, if all html files were e.g. at /:locale/blog/ and all non-html assets were at /blog-assets/, instead of /.

There's already a similar ticket #2335.

An alternative is to use pathPrefix option, but, at least in my case, it complicates things a lot and not everything works with it correctly, e.g. serve command etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions