Open jonathan-s opened 3 years ago
There are multiple topics here to pick apart. I have a fairly large project where I'm making extensive use of Sockpuppet in coordination with custom Stimulus controllers to manage user interactions and web components via LitElement. The controller and WC code get bundled by Webpack in the same manner as the demo Sockpuppet repo (with some modifications for my specific use case). I'm shipping each page with exactly the JS it needs to run, packaged modularly to maximize the ability of the browser cache to reuse code for components like search bars and document viewers that can appear in a variety of contexts. Here's an example of a document viewer built out of stacked iframe
s rendered in a shadow DOM with a native Django form that triggers a Reflex and serializes the data without ever triggering a new page load. Everything is still very WIP right now and I have styling and domain modeling specific to my project still incorporated with the generally reusable code, so until I get those things more separated and decide on a new permanent name for the repo this isn't a great example for new people to learn from, but it's heading in the direction of spawning multiple examples.
Because there is no easy way to combine their develeopment server output with sockpuppet... in a way I know of.
The setup found on this repository works fine unless you have dependencies that have special transpiler needs. In cases like Babel proposals or preprocessor languages, a custom Webpack setup is necessary. I have a working example of one such setup and have enough Webpack experience to talk other people through figuring out what rules they might require. @JulianFeinauer and I had some talks a few weeks ago about formalizing a process for Sockpuppet building via Webpack, which would tack a Webpack pipeline onto Django and make it accessible via management commands and maybe even admin features.
Feature Request
The discussion that happens here -> #80. Can continue in this issue. Just a heads up @nerdoc