npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

rolldown-plugin-solid

v0.2.1

Published

A Rolldown plugin for compiling SolidJS JSX/TSX files using Babel presets

Readme

rolldown-plugin-solid

npm version license

A Rolldown plugin for compiling SolidJS JSX/TSX files using Babel presets. Basically is a migration from esbuild-plugin-solid.

Installation

# Using pnpm (recommended)
pnpm add -D rolldown-plugin-solid

# Using npm
npm install --save-dev rolldown-plugin-solid

# Using yarn
yarn add --dev rolldown-plugin-solid

Usage

Basic Setup

Create a rolldown.config.js file in your project root:

import { defineConfig } from 'rolldown';
import solid from 'rolldown-plugin-solid';

export default defineConfig({
  input: 'src/index.tsx',
  plugins: [
    solid()
  ],
});

Configuration Options

The plugin accepts an options object with the following properties:

Basic Options

interface Options {
  /** TypeScript preset options */
  typescript?: object;
  
  /** Babel transform options */
  babel?: TransformOptions | ((source: string, id: string, ssr: boolean) => TransformOptions);
  
  /** Solid-specific options */
  solid?: SolidOptions;
}

Solid Options

interface SolidOptions {
  /** Runtime module name @default "solid-js/web" */
  moduleName?: string;
  
  /** Output mode @default "dom" */
  generate?: 'ssr' | 'dom' | 'universal';
  
  /** Enable hydration markers @default false */
  hydratable?: boolean;
  
  /** Enable automatic event delegation @default true */
  delegateEvents?: boolean;
  
  /** Enable smart conditional detection @default true */
  wrapConditionals?: boolean;
  
  /** Set render context on Custom Elements @default true */
  contextToCustomElements?: boolean;
  
  /** Built-in components to auto-import */
  builtIns?: string[];
}

Basic SolidJS App

// src/App.tsx
import { createSignal } from 'solid-js';

export default function App() {
  const [count, setCount] = createSignal(0);
  
  return (
    <div>
      <h1>Count: {count()}</h1>
      <button onClick={() => setCount(count() + 1)}>
        Increment
      </button>
    </div>
  );
}

SSR Configuration

// rolldown.config.js
import { defineConfig } from 'rolldown';
import solid from 'rolldown-plugin-solid';

export default defineConfig({
  input: 'src/server.tsx',
  plugins: [
    solid({
      solid: {
        generate: 'ssr',
        hydratable: true
      }
    })
  ],
});

Advanced Configuration

// rolldown.config.js
import { defineConfig } from 'rolldown';
import solid from 'rolldown-plugin-solid';

export default defineConfig({
  input: 'src/index.tsx',
  plugins: [
    solid({
      // TypeScript options
      typescript: {
        onlyRemoveTypeImports: true
      },
      
      // Solid options
      solid: {
        moduleName: 'solid-js/web',
        generate: 'dom',
        hydratable: false,
        delegateEvents: true,
        wrapConditionals: true,
        contextToCustomElements: true,
        builtIns: [
          'For', 'Show', 'Switch', 'Match',
          'Suspense', 'SuspenseList', 'Portal',
          'Index', 'Dynamic', 'ErrorBoundary'
        ]
      },
      
      // Custom Babel configuration
      babel: {
        plugins: [
          // Add any additional Babel plugins
        ]
      }
    })
  ],
});

Universal/Isomorphic Setup

// rolldown.config.js
import { defineConfig } from 'rolldown';
import solid from 'rolldown-plugin-solid';

export default defineConfig({
  input: 'src/index.tsx',
  plugins: [
    solid({
      solid: {
        generate: 'universal',
        moduleName: 'solid-js/universal'
      }
    })
  ],
});

Development

# Clone the repository
git clone https://github.com/g-mero/rolldown-plugin-solid.git
cd rolldown-plugin-solid

# Install dependencies
pnpm install

# Build the plugin
pnpm build

# Run tests
pnpm test

# Run linting
pnpm lint

License

MIT © g-mero

Related Projects