-
Notifications
You must be signed in to change notification settings - Fork 343
Appending extensions in the url files #135
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
Conversation
Thanks but I think it would be better to add support to the template tags so they add a suffix to the files like {% render_bundle 'main' 'css' suffix='.gz' %} |
@owais updated pull request, the suffix now is added in the template tag. |
webpack_loader/utils.py
Outdated
elif chunk['name'].endswith(('.css', '.css.gz')): | ||
tags.append(( | ||
'<link type="text/css" href="{0}" rel="stylesheet" {1}/>' | ||
).format(chunk['url'], attrs)) | ||
).format(''.join([chunk['url'], suffix]), attrs)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not href="{0}{1}" {2}".format(url, suffix, attrs)
?
Please consider to merge it or make an .gzip implementation. |
Can someone confirm if this is still a viable solution and still works with the latest master before we merge it? |
@rvlb could you please check this one? |
# Conflicts: # README.md # webpack_loader/loader.py # webpack_loader/utils.py
# Conflicts: # webpack_loader/templatetags/webpack_loader.py # webpack_loader/utils.py
FYI this was just included in the 1.3.0 version |
In order to allow to import gzip files, this pull request adds a configuration section to load the gzip files.