Earlier quoted context omitted.
Dead code elimination is related to but distinct from tree shaking - it also means that unused code branches get removed, for example constants like NODE_ENV get replaced with a static value, and if you have a static condition that always results to true, the else branch is removed.
In my book that's all covered by the term 'dead code elimination', e.g. removing (or not including in the first place) any code that can be statically proven to be unreachable at runtime. Some JS minifiers (like Google's Closure) can do the same thing in Javascript on the AST level (AFAIK Closure essentially breaks the input code down into an AST, then does static control flow analysis on the AST, removes any unreach…
Mako – fast, production-grade web bundler based on Rust
101–110 of 215 posts
Re: Mako – fast, production-grade web bundler based on Rust
#102Every bundler these days boasts "Rust" and "fast". What people really want is webpack feature parity. For a large enough organization with complex use cases and resource management, I yet need to see a real webpack equivalent. (Meanwhile, swc parser can't yet pass all tests in test262 according to their website: https://docs.rs/swc_ecma_parser/latest/swc_ecma_parser/ )
The problem is that we have already n-thousands alternatives, so it's a slightly different setup everytime - but generally as long as it's not webpack, it's all good.
Recently someone disabled turbopack on a next.js project because one new dependency wasn't supported and the developers started complaining right away the app was unbearably slow. The team couldn't work on latest for a week, they were just reverting the latest changes breaking turbopack support, working and then pushing.
Re: Mako – fast, production-grade web bundler based on Rust
#103Every bundler these days boasts "Rust" and "fast". What people really want is webpack feature parity. For a large enough organization with complex use cases and resource management, I yet need to see a real webpack equivalent. (Meanwhile, swc parser can't yet pass all tests in test262 according to their website: https://docs.rs/swc_ecma_parser/latest/swc_ecma_parser/ )
Re: Mako – fast, production-grade web bundler based on Rust
#104I was confused by the "Rust" denotion in the title and presumed it was an alternative builder to compile rust for web (wasm?). It's "yet another" bundler for javascript. Built in rust.
If they didn’t tell us it was built in Rust how would we ever know how smart the developers are?
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
#105Argh name choice ... https://www.makotemplates.org/
Re: Mako – fast, production-grade web bundler based on Rust
#106Every bundler these days boasts "Rust" and "fast". What people really want is webpack feature parity. For a large enough organization with complex use cases and resource management, I yet need to see a real webpack equivalent. (Meanwhile, swc parser can't yet pass all tests in test262 according to their website: https://docs.rs/swc_ecma_parser/latest/swc_ecma_parser/ )
how’s esbuild? I’ve yet to hit something I had in webpack that isn’t a couple line plugin away from being present in esbuild
Esbuild is the only current build-tool that keeps one sane. The serve-mode is excellent and elegant with no brittle constantly breaking hacks like HMR or file watching.
Sadly configuring especially the serve-mode is a bit badly documented, and not usable via CLI flags if one needs plugins.
Re: Mako – fast, production-grade web bundler based on Rust
#107I've recently taken a legacy Typescript clientside codebase that was using webpack to generate tens of js packages from minutes to seconds by using bun [0] for both dev and build: For dev I replaced webpack with "bun vite": it loads scripts ad hoc and is thus super fast at startup, and it still supports hot reloading. For build I use "bun build". I've created a small script where I don't specify the output folder, bu…
Bun.build actually has a `define:` option that does the same thing as your replace. If you use it, it'll even propagate the value, and treeshake away any `if(import.meta.hot)` you have.
Re: Mako – fast, production-grade web bundler based on Rust
#108Earlier quoted context omitted.
The situation with the tooling constantly changing isn't nearly as bad as the front-end frameworks themselves. I've been updating my knowledge of front-end, and it's an absolute shambles. The official React documentation( https://react.dev/learn/start-a-new-react-project ) is telling me that in order to use their framework, I need to use another framework to solve (quote)"common problems such as code-splitting, routi…
Nextjs is the trojan horse sent to destroy React and it worked
Re: Mako – fast, production-grade web bundler based on Rust
#109Every bundler these days boasts "Rust" and "fast". What people really want is webpack feature parity. For a large enough organization with complex use cases and resource management, I yet need to see a real webpack equivalent. (Meanwhile, swc parser can't yet pass all tests in test262 according to their website: https://docs.rs/swc_ecma_parser/latest/swc_ecma_parser/ )
Re: Mako – fast, production-grade web bundler based on Rust
#110Earlier quoted context omitted.
If they didn’t tell us it was built in Rust how would we ever know how smart the developers are?
Personally, I appreciate knowing when something is written in Rust. I know it is very likely I can easily install it and try it out immediately and that it is likely faster than any non-native tool I'm currently using. However, I do find "based on Rust" instead of "written in Rust" to be an odd choice of terms.
As for the language "based on Rust", it's likely bad wording due to them not being native English speakers.