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

Not compressing .js files? #37

Open
DavidMoffatt1 opened this issue Sep 27, 2022 · 7 comments
Open

Not compressing .js files? #37

DavidMoffatt1 opened this issue Sep 27, 2022 · 7 comments

Comments

@DavidMoffatt1
Copy link

I am using the Compress(app) method of implementation and it looks like my .js files are not being compressed at all.

Anyone facing this issue as well?

@alexprengere
Copy link
Collaborator

Can you check whether this still happens with the latest 1.13 release?
If that is the case this was a duplicate of #35

@DavidMoffatt1
Copy link
Author

Yes; I am using v 1.13 release.

@alexprengere
Copy link
Collaborator

I cannot reproduce with 1.13, I would need more details. Javascript files should be compressed by default (based on their mimetypes).

@DavidMoffatt1
Copy link
Author

No problem! Let me know what info you need and I will do my best to provide.

@dev-adas
Copy link
Contributor

Check out this PR, it may explain why your .js files were not being compressed. Add app.config['COMPRESS_MIMETYPES'].append('text/javascript') and check if that works.

@alexprengere
Copy link
Collaborator

That PR was merged, can you check that it solved your issue? (note that no release has been done for now, you can either test it by install flask-compress from GitHub, or use the line mentionned in @dev-adas comment).

@alexprengere
Copy link
Collaborator

@DavidMoffatt1 can you check that your issue will be solved by this?

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

No branches or pull requests

3 participants