I think you confused with building and bundling source into one file.īuilding is optional on node if you run js file or using other alternatives I mentioned above for ts file butīuild usually people make npm run build script to transpile ts to js, run lint etc. The effort to make it efficient on runtime doesn't worth the dev time.īonus ⭐ Other then Deno and ts-node, SWC-node make it super fast alternative that you can just run TypeScript without thinking much. I made up to the point everything is statically generated including Protobuf model but not bundle. I did bundling on NodeJS, it's not going to be easy because less support for Webpack on backend, try your best to setup in an hour for your first time. Even web is towards reducing bundling that dev still can't move on yet, yeah it takes time, then why bother on server side. Boom, the build time is instant because no build needed. If you haven't build > 30s web project, you not making serious website yet. Internet speed and http/2 etc makes bundling just a burden to dev esp when build time is huge. JS module solve many problem esp in web and browser. That's a good time when Webpack come in merge everything into one make it easier for dev, and a lot of tools built on top of it.įast forward now. So there's a need to bundle, that could reduce load time if doing correctly. Browser also limit request by 10 at a time. Imagine how dev want to build website, there are long script and script here and there. NodeJS itself just born Webpack don't exist yet. One upon a time when JS doesn't have module, the ecosystem is diverged into multiple ways to load scripts.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |