A simple server and client builder implementation that always builds both the client SPA and server entry points.
Both are bundled at all times and uses existing esbuild plugins for additional functionality.
The current build script expects the following.
.
├── client
│ ├── index.html # basic index.html structure
│ ├── main.js # holds the js app
├── public
│ ├── app.css # public resources, that don't need building
├── server.js # the server entry point
└── build.js
The reason for this script is that I don't like using frameworks and nor do I like tiptoeing around black boxes of JS,
this solution keeps the original code as is and the only magic here is the relative positioning of the final assets which is where the copy plugin helps us.