Skip to content

Client side compilation

Greg Bowler edited this page May 19, 2026 · 1 revision

Client-side compilation is the practical side of the build system. Source CSS, JavaScript, and static resources need to become files the browser can actually request from the web root.

Even assets that are not "compiled" still often need copying into www/.

What gets compiled or copied

Typical examples are:

  • Sass or other stylesheet preprocessors
  • JavaScript source files
  • images and other static resources

The exact toolchain is up to the project. WebEngine does not force one front-end stack.

Development workflow

WebEngine does not dictate a build tool, though a common default setup uses npm-installed tools such as sass and esbuild.

During development, watch mode is useful because the build output updates whenever source files change. One-off builds are useful when checking the pipeline or preparing a release.

The important rule is that the finished assets end up in the public web root so the browser can fetch them.

Production workflow

In production, builds should be deterministic and repeatable. That usually means running the same build process in CI or deployment rather than relying on manual local steps.

It is also normal to disable source maps and other development-only output in production builds.


Next, let's learn about testing WebEngine applications.

Clone this wiki locally