A babel plugin to use PrismJS with standard bundlers.
How to Use
This plugin allows you to treat PrismJS as a standard module and configure what languages, plugins, & themes you want to bundle with Prism.
In your code, import
Prism object will be the fully-configured Prism instance.
- You must be using ES6 imports to load PrismJS.
Configuring the plugin
In your .babelrc, register the plugin and configure its dependencies:
Each key are used as follows:
languages: Array of languages to include in the bundle. Those languages can be found here.
plugins: Array of plugins to include in the bundle. Those plugins can be found here.
theme: Name of theme to include in the bundle. Themes can be found here. Use
lower-kebab-casefor the theme name, e.g.
css: Boolean indicating whether to include
.cssfiles in the result. Defaults to
imports will be added for
.cssfiles. Must be
truein order for