Skip to content

AppRun-Site Build

The AppRun-Site build command compiles your page to ES Modules with esbuild.

npx apprun-site build

The build command scans your pages in the pages directory and compiles them into the public directory.

/public             <- compiled site
  /index.html       <- copied from `pages/index.html`
  /index.js         <- compiled from `pages/`
  /main.js          <- compiled from `pages/main.tsx` and some bootstrap code
    index.js        <- compiled from `pages/about/`
    index.js        <- compiled from `pages/contact/index.tsx`

/pages              <- source pages
  /index.html       <- index page
  /         <- home page
  /main.tsx         <- start up code
  /about        <- about page, markdown
    contact.tsx     <- contact page, AppRun component

The compiled js files are ES modules. They are compatible on the client-side and server-side.

Next, you will learn about client-side rendering.