
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
@rolldown-plugin/solid
Advanced tools
A Rolldown plugin for compiling SolidJS JSX/TSX files.
This is a fork of rolldown-plugin-solid
# Using bun
bun add -d @rolldown-plugin/solid
# Using pnpm
pnpm add -D @rolldown-plugin/solid
# Using npm
npm install --save-dev @rolldown-plugin/solid
# Using yarn
yarn add --dev @rolldown-plugin/solid
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()
],
});
The plugin accepts an options object with the following properties:
interface Options {
/** TypeScript preset options */
typescript?: object;
/** Solid-specific options */
solid?: SolidOptions;
}
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[];
}
// 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>
);
}
// 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
}
})
],
});
// 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'
]
},
})
],
});
// 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'
}
})
],
});
FAQs
A Rolldown plugin for compiling SolidJS JSX/TSX files
We found that @rolldown-plugin/solid demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.