Skip to content

Conversation

@pytrumpeter
Copy link

@pytrumpeter pytrumpeter commented Feb 19, 2019

I have multiple webpack entry points in my project, and depending on changes to JS or CSS code I made in any given module, I'd have to constantly change the bundle_name value. See issue #165. So, to prevent having to constantly make these changes, and to avoid breaking current functionality, I created a new template tag, render_bundle_auto, where you can simply use the entry point name as your bundle_name and the plugin will search for that name within the chunk names. If the module name is in a chunk name, it will include the tag. I have tested this for my own config and it's working fine, but there are very different webpack configs out there, so that's a major caveat.

Also, this code assumes that if you include a content hash in your Webpack config, that it is separated by a hyphen (seems like this is the convention?)

I'm very open to suggestions or changes.

@pytrumpeter pytrumpeter mentioned this pull request Feb 19, 2019
@bhrutledge
Copy link
Contributor

Thanks for the work, @harveynr. I'm not a maintainer of this project, but I recently dug into existing issues and PRs that I believe are related to the issue you're describing. Did you take a look at PR #182? Does that address your issue at all?

Also, when submitting a PR, I think it's helpful to reference the issue(s) that you're trying to fix in the description; in this case, that's #165. GitHub will link between the issue and the PR.

@pytrumpeter
Copy link
Author

I did see #182 along with one or two others, and I think it either had external dependencies that it was hung up on, and/or it had a lot more code that had changed. I ran into this issue in a big way a few days ago, and after monkey patching the code today, I figured I'd tidy it up a bit and submit it. I think ultimately someone just needs to pick the best solution, I don't know if this is it, but it was a quick (and rather dirty) fix that seemed to work. Also thanks for the reference to the issue, I referenced the PR from the issue but not the other way around.

@dfrankow
Copy link

dfrankow commented Apr 1, 2021

Is anyone going to review this? Seems like it could be very useful.

@owais
Copy link
Collaborator

owais commented Apr 1, 2021

This project is not maintained anymore. Unless some company/org steps up to adopt this package, I don't think any PRs will be merged any time soon.

@dfrankow
Copy link

dfrankow commented Apr 1, 2021

Ah right. Thanks for your response!

@fjsj fjsj self-requested a review April 30, 2021 18:22
@fjsj fjsj self-assigned this Apr 30, 2021
@rvlb
Copy link
Contributor

rvlb commented May 5, 2021

Closing as render_bundle_auto's behavior is achieved by using webpack-bundle-tracker@v1.0.0-alpha.1 in conjunction with PR #232 changes.

@rvlb rvlb closed this May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants