Solid

SolidJS projects should work out of the box with Preview.js.

If you need to set up global state or wrap your components, you can create a file named __previewjs__/Wrapper.tsx that exports a <Wrapper /> component:

// __previewjs__/Wrapper.tsx

import "../src/styles.css";

export const Wrapper = ({ children }: { children: JSX.Element }) => {
  return <div className="wrapped">{children}</div>;
};