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

Appending extensions in the url files #135

Merged
merged 10 commits into from Aug 23, 2021
Merged

Conversation

joshjo
Copy link
Contributor

@joshjo joshjo commented Nov 9, 2017

In order to allow to import gzip files, this pull request adds a configuration section to load the gzip files.

@owais
Copy link
Collaborator

owais commented Nov 24, 2017

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 owais mentioned this pull request Nov 24, 2017
@owais
Copy link
Collaborator

owais commented Nov 24, 2017

@joshjo #137

@joshjo
Copy link
Contributor Author

joshjo commented Dec 13, 2017

@owais updated pull request, the suffix now is added in the template tag.

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))
Copy link
Collaborator

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)?

@jonalxh
Copy link

jonalxh commented Mar 13, 2020

Please consider to merge it or make an .gzip implementation.

@owais
Copy link
Collaborator

owais commented Mar 13, 2020

Can someone confirm if this is still a viable solution and still works with the latest master before we merge it?

@fjsj fjsj requested a review from rvlb May 6, 2021 13:09
@fjsj
Copy link
Member

fjsj commented May 6, 2021

@rvlb could you please check this one?

@fjsj fjsj assigned rvlb May 6, 2021
@fjsj fjsj unassigned rvlb Jul 15, 2021
# Conflicts:
#	README.md
#	webpack_loader/loader.py
#	webpack_loader/utils.py
# Conflicts:
#	webpack_loader/templatetags/webpack_loader.py
#	webpack_loader/utils.py
@joaopslins joaopslins merged commit fffb889 into django-webpack:master Aug 23, 2021
@joaopslins
Copy link
Contributor

FYI this was just included in the 1.3.0 version

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.

None yet

6 participants