Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Add query string versioning for static assets in build process #1109

Closed
wants to merge 1 commit into from

Conversation

n-pn
Copy link

@n-pn n-pn commented Mar 6, 2020

This makes browser and cloudflare refresh the cache when the content of global.css or favicon.ico changed.

@benmccann
Copy link
Member

The tests seem to be failing with this PR

I think I would instead prefer that the cache TTL is set to 0 on dynamic assets and forever on static assets along with using webpack and rollup to inject hashes into the static asset file names

@benmccann
Copy link
Member

#1173 seems like it might solve this issue for you as well and is probably going in a better overall direction

@n-pn
Copy link
Author

n-pn commented May 13, 2020

Yeah the tests were failed, I didn't even know the reason: it worked when I ran it using yarn dev, but it failed every time I ran yarn test, maybe because of the linting step, maybe it just didn't work using yarn.

Anyway, I figured it's better to make a post-build script instead of make a modification in sapper source code, so I kinda abandoned this PR.

Should I just leave it here for reference purpose, or just close it already?

@benmccann
Copy link
Member

Probably better to close it if it won't be pursued. It'll make it easier to keep track of which PRs need review. And it can still be referenced even if closed

@n-pn n-pn closed this May 13, 2020
@n-pn
Copy link
Author

n-pn commented May 13, 2020

Closed it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants