Softwr

Web Development · head to head

Preact vs Rspack

Preact logo

Preact

Web Development

3kB alternative to React with the same modern API

From
Free
Free plan
Yes
Rspack logo

Rspack

Web Development

Rust-based web bundler with a webpack-compatible API and fast builds

From
Free
Free plan
Yes

The short version

  • Rspack is an MIT-licensed web bundler written in Rust.
  • Both are free.
  • Only Preact lists 3kB runtime; only Rspack lists rust based bundler.
  • Where Preact falls short: compatibility through preact/compat is good but not total, and some React libraries break in ways that are hard to diagnose.
  • Where Rspack falls short: compatible with most, not all, webpack options and plugins.

How do Preact and Rspack differ?

Preact and Rspack differ on pricing model. Only the attributes on which Preact and Rspack actually diverge.

Attributes where Preact and Rspack differ
AttributePreactRspack
Pricing modelOpen source, no licence feeOpen-source

Identical on both: starting price (Free), free tier (Yes), platforms (Web).

Not yet recorded: category for Rspack.

Which features does each one have?

They share no listed features; 4 appear only for Preact and 8 only for Rspack. Drawn from each product's published feature list. An absence here means we hold no record of it - not that the product lacks it.

Only in Preact

  • 3kB runtime
  • preact/compat
  • Same modern API
  • Fast rendering

Only in Rspack

  • Rust based bundler
  • webpack API compatibility
  • Incremental and lazy compilation
  • Persistent caching
  • Module Federation
  • Code splitting and tree shaking
  • React Server Components
  • Rsbuild, Rslib and Rspress toolchain

What is each one used for?

Preact is most often brought in for embedded widgets that load inside someone else’s page and must stay small; Rspack for speeding up large webpack builds. The jobs each tool is most often brought in to do.

Preact

  • Embedded widgets that load inside someone else’s page and must stay smallnot Rspack
  • Marketing and content sites where JavaScript payload affects Core Web Vitalsnot Rspack
  • Applications targeting low-bandwidth or low-powered devicesnot Rspack

Rspack

  • Speeding up large webpack buildsnot Preact
  • Micro frontends with Module Federationnot Preact
  • Library and component builds via Rslibnot Preact
  • Documentation sites via Rspressnot Preact

Where do Preact and Rspack fall short?

Preact's most cited limit: behavioural differences from React exist in edge cases, particularly around event handling. Rspack's: compatible with most, not all, webpack options and plugins. Documented limitations, not opinions. Every one is a constraint you would hit in normal use.

Preact

  • Compatibility through preact/compat is good but not total, and some React libraries break in ways that are hard to diagnose
  • Behavioural differences from React exist in edge cases, particularly around event handling
  • A much smaller community, so unusual problems have fewer existing answers than React

Rspack

  • Compatible with most, not all, webpack options and plugins
  • Major version upgrade from v1 to v2 needs a migration step
  • Bundler only, with application structure left to you or Rsbuild
  • Rust internals are harder to patch than a JavaScript bundler

How much do Preact and Rspack cost?

Preact is free to use; Rspack is free to use. Plan by plan below, from each vendor's own pricing page.

Preact

Free
  • PreactFree
    • Full library
    • Commercial use permitted
    • No usage limits

Rspack

Free

No published plan breakdown. See the Rspack review.

Which should you pick?

Choose Preact if

  • You need 3kb runtime.
  • You want to start without paying.
  • You also want preact/compat.

Choose Rspack if

  • You need rust based bundler.
  • You want to start without paying.
  • You also want webpack api compatibility.

Questions people ask

Is Preact or Rspack better?
It depends on the job. Preact fits embedded widgets that load inside someone else’s page and must stay small; Rspack fits speeding up large webpack builds. Preact starts at Free and Rspack at Free.
Which is cheaper, Preact or Rspack?
Preact starts at Free and Rspack at Free.
Does Preact or Rspack run on more platforms?
Both run on Web, so platform support will not decide this one for you.
Can I use Preact for free?
Both have a free tier, so you can try either at no cost before committing.
What is Preact best used for?
Preact is most often used for embedded widgets that load inside someone else’s page and must stay small, marketing and content sites where javascript payload affects core web vitals, applications targeting low-bandwidth or low-powered devices. Of those, embedded widgets that load inside someone else’s page and must stay small and marketing and content sites where javascript payload affects core web vitals are not what Rspack is typically brought in for.
What can Preact do that Rspack cannot?
Preact covers 3kB runtime, preact/compat, Same modern API, Fast rendering. Rspack covers Rust based bundler, webpack API compatibility, Incremental and lazy compilation, Persistent caching.

Answered from the vendors’ own pages

Preact: Is Preact free?

Yes, open source under the MIT licence.

Rspack: Can I reuse my webpack config in Rspack?

Rspack is compatible with the vast majority of webpack's configuration options and APIs, so loaders and plugins can usually be reused.

Source
Preact: Can I use React libraries with Preact?

Most, through the preact/compat layer. Compatibility is good but not complete, so libraries relying on React internals can break.

Rspack: What licence is Rspack under?

Rspack is released under the MIT licence.

Source
Preact: Why choose Preact over React?

Bundle size, almost always. If payload is not a binding constraint, React’s ecosystem is usually the better trade.

Rspack: What else is in the Rstack family?

Rsbuild, Rslib, Rspress, Rstest, Rslint and Rsdoctor.

Source
Share

Related pages

Other head to heads