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

gzip assets #248

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

gzip assets #248

wants to merge 1 commit into from

Conversation

chazsconi
Copy link

This replaces the js and css assets with their gzipped versions. Unzipped one of the js files is 1.3M and this reduces it to around 300k.

This is probably not the cleanest way to fix this as I just manually zipped the files and committed them. If the swagger-ui-dist package is updated in the future, then this would need to redone.

A better fix could be to provide instructions on how to fetch swagger-ui-dist package in your asset pipeline and then be able to pass a function that would calculate the path to the static assets that is used in the template. If using Phoenix you would pass something like MyEndpoint.static_path.

Although this would be cleaner it's a more complex setup for the user of the library and a bigger refactor.

maysam added a commit to maysam/phoenix_swagger that referenced this pull request Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant