Superstatic is an enhanced static web server designed for modern web applications, currently at version 10.0.0. Originally built to power Firebase Hosting, it provides robust features such as HTML5 pushState support, clean URLs (removing `.html` extensions), advanced caching, and configurable routing via rewrites and redirects. It offers a flexible configuration system through `superstatic.json` or `firebase.json` files. The project maintains an active release cadence, frequently updating dependencies and Node.js engine support, with recent versions focusing on compatibility with newer Node.js LTS releases. Key differentiators include its rich configuration options for dynamic static site behavior, strong support for Single Page Applications (SPAs), and its historical role in Firebase's infrastructure.
npm install superstaticVerified import paths — ran on the pinned version, not inferred.
Initializes and starts a Superstatic server instance programmatically, demonstrating basic configuration for serving a 'public' directory, enabling clean URLs, setting up SPA rewrites, and adding custom cache headers.
Update your `superstatic.json` or `firebase.json` configuration to set `cleanUrls` to `true` or `false`.
Upgrade your Node.js runtime to version 12 or newer. Refer to the `engines.node` field in `package.json` for supported versions.
Upgrade your Node.js runtime to version 20, 22, or 24. Always check the `engines.node` field for the latest supported versions.
Upgrade to Superstatic v9.1.0 or newer to ensure correct handling of unicode characters in redirect paths.
Test your application's routing thoroughly after upgrading to v9.2.0 or higher if you rely on very specific URL parsing behaviors, especially for complex query strings or unusual path segments.
If running on Node.js 22, ensure you are using `superstatic` v9.1.0 or newer to avoid potential issues with file modification times.
Verify that your `public` configuration setting in `superstatic.json` or `firebase.json` correctly points to the directory containing your static assets, relative to the configuration file, and that the requested file exists.
Set `cleanUrls` to a boolean value (`true` or `false`) in your `superstatic.json` or `firebase.json` file. Array support for `cleanUrls` was removed in v6.0.0.
Upgrade your Node.js runtime environment to one of the officially supported LTS versions (20, 22, or 24). You can use a tool like `nvm` to manage Node.js versions.
Review your `redirects` configuration in `superstatic.json` or `firebase.json` and ensure all `destination` paths are valid and non-empty. Pay special attention to segmented redirects (`:segment`) to ensure they resolve correctly.
No dependency data recorded yet.