
Security News
Open VSX Unblocks Extension IDs Used in Malware Campaign
Open VSX has removed three extension IDs from its malicious-extension list as the legitimate publishers they impersonated move to claim the names for themselves.
rolldown-plugin-solid
Advanced tools
A Rolldown plugin for compiling SolidJS JSX/TSX files using Babel presets
A Rolldown plugin for compiling SolidJS JSX/TSX files using Babel presets. Basically is a migration from esbuild-plugin-solid.
# 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
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;
/** Babel transform options */
babel?: TransformOptions | ((source: string, id: string, ssr: boolean) => TransformOptions);
/** 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'
]
},
// Custom Babel configuration
babel: {
plugins: [
// Add any additional Babel plugins
]
}
})
],
});
// 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'
}
})
],
});
# 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
MIT © g-mero
FAQs
A Rolldown plugin for compiling SolidJS JSX/TSX files using Babel presets
The npm package rolldown-plugin-solid receives a total of 2,006 weekly downloads. As such, rolldown-plugin-solid popularity was classified as popular.
We found that rolldown-plugin-solid demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Open VSX has removed three extension IDs from its malicious-extension list as the legitimate publishers they impersonated move to claim the names for themselves.

Product
Socket’s PHP and Composer support is now in Beta for all customers, with PHP reachability analysis generally available.

Product
Socket is bringing experimental protection to Firefox, scanning 97,000+ extensions in Mozilla's official directory for malware and risky updates.