Sandstone is built with webpack and ships three distinct output bundles from a single source tree. Before you can run the example frontend or integrate Sandstone into your own project, you need to compile those bundles from source. The steps below walk you through cloning the repository, installing dependencies, and running the production build.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ading2210/sandstone/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- Node.js — any actively maintained LTS release
- npm — bundled with Node.js
- git — required to clone the repository and for the build to read version metadata
Build steps
Build outputs
The webpack config produces three separate bundles, each serving a different purpose.| File | Purpose |
|---|---|
dist/sandstone_frame.js | Frame-side bundle injected into the sandboxed iframe at runtime |
dist/sandstone.js | UMD bundle that exposes a global sandstone variable |
dist/sandstone.mjs | ES module bundle for use with import |
sandstone_frame.js contains all the code that runs inside the sandboxed iframe — the JavaScript rewriter, network layer, and DOM patches. Sandstone inlines this file automatically when it creates the iframe; you do not load it directly in your HTML.
sandstone.js is the UMD bundle. Include it with a <script> tag and access the library through the sandstone global variable.
sandstone.mjs is the ES module bundle. Import it at the top of your own module:
Production vs. development commands
npm run dev starts webpack in watch mode. It recompiles the bundles automatically whenever you save a source file, which is useful during active development.
Version metadata
The webpack config reads version information directly from git at build time:-dev to the version declared in package.json. Both __VERSION__ and __GIT_HASH__ are injected as compile-time constants so the runtime can report the exact build it was compiled from.