This supports all kinds of non-platform-standard features that may tie your project to this specific bundler, but will tie them to bundlers in general. It would be much better to have projects that work without bundlers, that can use them as an optimization step.
Imagine if you could just scp your source code tree onto a CDN and it would automatically bundle it based on how clients import it.
Mako – fast, production-grade web bundler based on Rust
151–160 of 215 posts
Re: Mako – fast, production-grade web bundler based on Rust
#152Can I kick it off programmatically inside a Cargo build via build.rs? I tried to go down this road with SWC and ... failed. To be clear: I have JS/HTML artifacts in my repo alongside Rust source. I want to bundle them then ship them inside a produced Rust binary, or at least with it. With one build step using Cargo.
what about this https://crates.io/crates/rust-embed
Re: Mako – fast, production-grade web bundler based on Rust
#153Re: Mako – fast, production-grade web bundler based on Rust
#154Can I kick it off programmatically inside a Cargo build via build.rs? I tried to go down this road with SWC and ... failed. To be clear: I have JS/HTML artifacts in my repo alongside Rust source. I want to bundle them then ship them inside a produced Rust binary, or at least with it. With one build step using Cargo.
Re: Mako – fast, production-grade web bundler based on Rust
#155This supports all kinds of non-platform-standard features that may tie your project to this specific bundler, but will tie them to bundlers in general. It would be much better to have projects that work without bundlers, that can use them as an optimization step.
As soon as the browser specs catch up to what the bundlers are doing I’d drop them in a heartbeat. Not holding my breath though
CSS has advanced enough that I haven't used Less or Sass in many years. Modules make loading easy. Import maps let you use bare module specifiers (or you could use a simple transform in a dev server). CSS modules let you import CSS into JavaScript.
I never use a bundler during development.
Re: Mako – fast, production-grade web bundler based on Rust
#156Earlier quoted context omitted.
As soon as the browser specs catch up to what the bundlers are doing I’d drop them in a heartbeat. Not holding my breath though
You can get pretty far by using importmaps, you would not have treeshaking or a single bundled file, but it works pretty well. JSDoc can be used to add types to your project (that can be typechecked using typescript). I'm currently building a hobby project using preact, htm and jspm for packages. It's pretty nice to just start building without starting a build tool, having to wait for it to finish, make sure it's not…
Re: Mako – fast, production-grade web bundler based on Rust
#157Earlier quoted context omitted.
Imagine if you could just scp your source code tree onto a CDN and it would automatically bundle it based on how clients import it.
This sounds similar to https://esm.sh/
Re: Mako – fast, production-grade web bundler based on Rust
#158Earlier quoted context omitted.
If they didn’t tell us it was built in Rust how would we ever know how smart the developers are?
Yeah, that's how I ended up using prisma... until I realised they didn't have joins All this aside, knowing something is in Rust tells me: - It's fast - It's maintainable (imagine the same project but in C)
Re: Mako – fast, production-grade web bundler based on Rust
#159I don't work in web, and possibly live under a rock. I'm a little confused around what bundlers actually do? I'd sort of assumed it was a typescript build thing before, but Mako's page gives me enough info to make me realise I'm wrong, but seems to assume people are working with some base knowledge I don't have. Any pointers to information of exactly what bundlers do? The emphasis on speed makes it sound like it's do…
- https://sunsetglow.net/posts/frontend-build-systems.html
- https://www.innoq.com/en/articles/2021/12/what-does-a-bundle...
- https://www.swyx.io/jobs-of-js-build-tools
Loosely put, they're the equivalent of all of `gcc` or `rustc`: compile the source code, run type checking, output object files, transform into the final combined executable output format.
Re: Mako – fast, production-grade web bundler based on Rust
#160What exactly is the point of a bundler in the rapid development cycle? If you want your web app to load up fast, it's better if you only need to redownload the parts that actually changed, so you're better off not bundling them.