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

An proposal for a better webpack_static #330

Closed
culshaw opened this issue Nov 15, 2022 · 2 comments
Closed

An proposal for a better webpack_static #330

culshaw opened this issue Nov 15, 2022 · 2 comments

Comments

@culshaw
Copy link

culshaw commented Nov 15, 2022

It would be really helpful if webpack_static had a twin which had the ability to take a static file then perform the same magic that happens by default with render_bundle.

For example:

{% render_bundle "js/myBundle.js %}

outputs

<script src="https://localhost.dev/static/myBundle.22e6caaab91a7c8e5758.js" integrity="sha256-dwhlwjqtPE+IiaX9FOmAAaMA0d+CqSq2kiQ7OcFm1aM=" ></script>

but an "unbundled" static file

{% webpack_static "js/myAsset.js" %}

outputs

/static/myAsset.js

Could there be a middle ground called asset_bundle where running

{% asset_bundle "js/myAsset.js" %}

would output

<script src="https://localhost.dev/static/myAsset.22e6caaab91a7c8e5758.js" integrity="sha256-dwhlwjqtPE+IiaX9FOmAAaMA0d+CqSq2kiQ7OcFm1aM=" ></script>

Pretty please 🙏

@culshaw culshaw changed the title An enhancement for webpack_static An proposal for a _better_ webpack_static Nov 15, 2022
@culshaw culshaw changed the title An proposal for a _better_ webpack_static An proposal for a better webpack_static Nov 15, 2022
@andruten
Copy link

I think webpack_static mimics django static templatetag.

@fjsj
Copy link
Member

fjsj commented Mar 9, 2023

Not supported, but please feel free to open PRs implementing this.
Closing as duplicate of #343

@fjsj fjsj closed this as completed Mar 9, 2023
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