@@ -102,24 +102,18 @@ code-splitting, and a wealth of loaders are the features typically cited as bein
102102[ react-hot-loader] ( https://github.com/gaearon/react-hot-loader ) is a particularly useful tool, as it allows
103103changes to your components to be streamed live into your browser.
104104
105- To integrate webpack's output into a python system, the two most popular solutions are:
106-
107- - [ django-webpack-loader] ( https://github.com/owais/django-webpack-loader ) - uses a webpack plugin to generate a
108- file for your python process to consume. Tends to be easier to reason about - does one thing and does it well.
109- Requires you to interact with webpack directly.
110- - [ python-webpack] ( https://github.com/markfinger/python-webpack ) - talks to a build server that wraps around
111- webpack. Tends to be more complex, but offers more features. Requires you to interact with a webpack-build
112- process.
113-
114- For most use-cases, both tools will provide similar functionalities. django-webpack-loader puts you in direct
115- control of webpack's processes, so it's a good starting point to learn about the tool. python-webpack
116- abstracts away webpack, so it may be easier to integrate.
117-
118- Note: older versions of this library used to provide tools for integrating React into your frontend. While
119- they provided some conveniences they also overly complicated deployments, limited the functionalities that
120- you could apply, and locked you in to a workflow which was contrary to React's best practices. If you want to
121- persist with the worflow previously offered, the [ self-mounting components example] ( examples ) illustrates the
122- wiring necessary to achieve it.
105+ If you want to integrate webpack's output into your python system, you can either hard-code the paths or you
106+ can use a manifest plugin that provides a way for your python system to introspect the compiler's state.
107+
108+ The most popular manifest tool is [ owais/django-webpack-loader] ( https://github.com/owais/django-webpack-loader ) .
109+ Owais has provided a great set of docs and examples, so it's your best bet for integrating webpack into your
110+ project.
111+
112+ If you need support for non-Django projects - or you want to use webpack with a decoupled library or app -
113+ [ markfinger/python-webpack-manifest] ( https://github.com/markfinger/python-webpack-manifest ) will sort you out.
114+
115+ There's also [ markfinger/python-webpack] ( https://github.com/markfinger/python-webpack ) , but it's a bit more
116+ heavy handed and is only of use if you need a really tight coupling between your python and javascript worlds.
123117
124118
125119render_component
0 commit comments