This project is no longer maintained.
Life got busy — work, kids, and the usual chaos. I no longer have the time or energy to keep up with issues or updates. Use it if it works for you, but don't expect updates or support.

Static Assets

Your components may depend on static assets such as images.

Preview.js automatically lets you import any asset with an import statement:

import icon from "./icon.svg";

If you prefer to use explicit paths instead, you may need to configure a public directory in preview.config.js:

// preview.config.js

import { defineConfig } from "@previewjs/config";

export default defineConfig({
  publicDir: "static",
});