3 ms·
I also like reducing dependencies, but I’ve picked a different approach. When I use an external library, I link to static production scripts, without webpack o
by merelysounds 3y ago
I also like reducing dependencies, but I’ve picked a different approach.
When I use an external library, I link to static production scripts, without webpack or other bundler. I do use babel to handle jsx if needed, but I do it by linking babel via a script tag in dev mode (and with a simple shell script in production).
It’s more radical, not recommended for production use and impractical for anything other than a hobby project. But it’s a way to limit adding new dependencies, or limit reliance on package managers. Additionally, the project can work with as much as a static file server, also for development - so I won’t get stuck on an “npm update” when I return to a project after a break.
Most recent website I’ve built like this is: https://merely.xyz/lenses https://merely.xyz/lenses , list of Sony E Mount FF lenses.
Again, for most cases web components sound like a more practical approach, I plan to explore that long term too.
- iamcreasy 3y agoThat's exactly what I've been trying to do for the last few days but get frequently hit by simple JS errors such as import failures, and currently I don't have the time to properly learn the language. Looking for a way to learn enough to get something up and running. Do you know any source that explains using React this way? I've looked into the source of merely.xyz but I am looking for something simpler that holds your hand.