An esbuild plugin for PrismJS that bundles specified languages, plugins, and themes at build time. Current stable version is 1.0.8, updated infrequently. It mirrors the options of babel-plugin-prismjs, allowing developers familiar with that plugin to switch seamlessly. Offers an inline option to embed CSS directly. Designed for projects using esbuild and needing syntax highlighting via PrismJS without runtime loading of languages.
npm install esbuild-plugin-prismjsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures esbuild with prismjsPlugin to bundle JavaScript and CSS highlighting, with line-numbers plugin and okaidia theme.
Use ES import syntax (import { prismjsPlugin } from 'esbuild-plugin-prismjs').Set inline: false in the plugin options to get separate CSS output.
Ensure css: true (or omit) to include theme CSS.
Change to ES import: import { prismjsPlugin } from 'esbuild-plugin-prismjs'Run: npm install prismjs
Check the language list: https://prismjs.com/#languages-list