Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to skip versioning of js & css files #12

Closed
djfarrelly opened this issue Jan 20, 2019 · 2 comments
Closed

Add option to skip versioning of js & css files #12

djfarrelly opened this issue Jan 20, 2019 · 2 comments
Labels
feature priority Priority tasks

Comments

@djfarrelly
Copy link
Contributor

Purpose

For us to be able to upload pre-hashed bundles and leverage code splitting w/ webpack or Next.js, we should allow the user to disable skip versioning of the js and css files.

Notes

  • We can't just detect an existing hash via <filename>.<hash>.js pattern b/c some assets like in Next.js are nested in a versioned directory instead (ex. static/<version>/pages/<filename>.js)
  • For this to work we may need to add a flag such as --skip-hash or --skip-versioning
  • I'm not sure if we'll have a mixed workflow where some files should be versions and some may not. If this is the case we may leave it to the end user to use this cli twice and stitch together the output

cc @msanroman

@msanroman
Copy link
Member

Got #19 working on Analyze with the behavior you were mentioning in here.

A good one to think about is if we'd like this to be the default for everyone, as it would encourage good practices on code splitting and bundle management for every project. So maybe buffer-static-upload@1.0.0 would either:

  • Shift this pattern from being the opt-in behavior to be the default one, and still allow adding versioning here with -with-versioning flag.
  • Remove versioning option altogether.

djfarrelly pushed a commit that referenced this issue Jun 26, 2019
@djfarrelly
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature priority Priority tasks
Projects
None yet
Development

No branches or pull requests

2 participants