Skip to content

Conversation

@robgolding
Copy link

No description provided.

@robgolding robgolding closed this Jul 4, 2019
@robgolding
Copy link
Author

Sorry @owais—opened this too early 😅

@owais
Copy link
Collaborator

owais commented Jul 4, 2019

@robgolding No worries but this has been requested before and I'm not keen on accepting this feature. I think this should be implemented outside django-webpack-loader.

Instead, I'd recommend to submit PR that would make the "loader" part swappable so people can do something like this in django settings:

WEBPACK_LOADER = { "LOADER_CLASS": "my_module.LoaderClass" }

We can then dynamically use this class instead of the built-in one. The class can load the config from anywhere it wants. This would allow the community to add any loaders it needed without django-webpack-loader having to implement or agree with their design.

LMK if you have any questions. Let's discuss the design before jumping into code.

@robgolding
Copy link
Author

Yeah, that makes total sense to me! I opened the PR by accident after modifying a fork as a proof-of-concept, but a dynamic loader class would be the best way to implement this properly for sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants