Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Welcome to the world of JS. Here is a clown nose for your authentic development experience: 🔴
-
First off, you're not wrong. But what do you mean with self contained bundle?
This works without a problem if you're not building a lib, which really should not inline its dependencies, as this would mess up the ecosystem even more. -
Nils342y@nitwhiz this works without a problem as long as you use pure Esbuild, webpack and maybe rollup but when theese technologies are mixed and mashed by the framework template/starter and it doesn't work out of the box it doesn't work.
And yes I would never ever do any processing except transpiling with libs, I talked about apps -
With vite I literally had an issue when it would run (the js deps are libraries, I'm not using any framework) but only in dev mode. When I exported the bundle it just complained it didn't find functions. It was actually giving some warnings but I didn't think it'd matter. Guess what. The warnings were the issues all along. Even though it ran in dev mode it still fd up the built bundle.
-
Probably will be downvoted for this... but it sounds like you're referring to fiddling and fighting a giant webpack config. If you're doing that in 2022, you're either working on something super super custom, or you've overengineered at some point and brought yourself too far down that path and have entrapped yourself in what you have recognized is bundling hell
I'd be curious as to what you are building / what the bundling is for -
Nils342y@fullstackclown no, no down vote for you <3.
So I wanted to do a seemingly quite simple task: making a solid Js SSR app that I can bundle self contained and have HMR (or something similar)
Solid itself offers SSR support with hydration but no meta framework for it but it's possible to have SSR.
So I tried a lot but all on the basis of the 'degit' TS template they provide that uses CSR and Vite. I tried `vite-plugin-ssr` which worked the best but creating a self contained bundle was not possible for me. I also tried building it as a node express app with vite-node vavitw and other plugins which (Jay) do create self contained bundles but struggle to compile solid so that it works (weird import things happen)
I settled on using svelte-kit since it's vite plugin does all the things that I want and well svelte is a nice framework too
If you want to know more or hell even help me feel free to contact me :) -
Inxentas7902y2002: "Flash is bad because it's all compiled code and you can't change it anymore once deployed, you need the original files".
2020: LETS COMPILE JAVASCRIPT GUYS -
@Nils ah then, confirmed as "something super super custom"
I cannot immediately help you in this area, though, good luck!
Related Rants
The Javascript build/bundling eco system is killing me every time I try to get into it.
Me: oh vite, a nice and fast bundle that supports hmr
Me: works like a charm
Well until I discovered that exporting a self contained bundle with Inlined dependencies is not a thing and you have to pray that your framework provides such plugins
The world of js/jsx/tsx bundling, building, tree shaking, transpiling, Inlining, transforming is such a wild west and that on top of an already very unstable layer of different frameworks that work so fundamentally different that you cannot apply a single principle to even 2 of then (from a building/ssr/bundling perspective)
Standards signing off when it comes to building node apps
rant
npm
js
bundling