Upgrading From Version 5 to 6.0

reveal.js 6.0 switches from gulp to Vite for building and running the development server. After pulling the latest changes, run npm install to get the updated dependencies. The dev server is still started with npm start.

Update ES Module Paths

The ES module build has been renamed from .esm.js to .mjs. Update any direct file references:

Old pathNew path
dist/reveal.esm.jsdist/reveal.mjs
plugin/markdown/markdown.esm.jsdist/plugin/markdown.mjs
plugin/highlight/highlight.esm.jsdist/plugin/highlight.mjs
plugin/math/math.esm.jsdist/plugin/math.mjs
plugin/notes/notes.esm.jsdist/plugin/notes.mjs
plugin/search/search.esm.jsdist/plugin/search.mjs
plugin/zoom/zoom.esm.jsdist/plugin/zoom.mjs

If you're importing reveal.js as an npm package, use the bare package specifiers instead and let the package exports handle resolution:

import Reveal from 'reveal.js';
import Markdown from 'reveal.js/plugin/markdown';

Update Plugin Paths (HTML/CDN)

If you load plugins directly in HTML or via CDN, the plugin files have moved from plugin/<name>/plugin.js into the dist/plugin/ directory:

Old pathNew path
plugin/notes/notes.jsdist/plugin/notes.js
plugin/markdown/markdown.jsdist/plugin/markdown.js
plugin/highlight/highlight.jsdist/plugin/highlight.js
plugin/math/math.jsdist/plugin/math.js
plugin/search/search.jsdist/plugin/search.js
plugin/zoom/zoom.jsdist/plugin/zoom.js
plugin/highlight/monokai.cssdist/plugin/highlight/monokai.css
plugin/highlight/zenburn.cssdist/plugin/highlight/zenburn.css

Update CSS Paths (npm)

When importing via npm, the dist/ prefix is no longer part of the public package API. Update any CSS imports to use the top-level package paths:

Old pathNew path
reveal.js/dist/reveal.cssreveal.js/reveal.css
reveal.js/dist/reset.cssreveal.js/reset.css
reveal.js/dist/theme/<name>.cssreveal.js/theme/<name>.css

TypeScript Types

TypeScript types are now bundled directly in the reveal.js package. If you were previously installing @types/reveal.js as a dev dependency you can remove it:

npm uninstall @types/reveal.js

The bundled types are independent from the community-maintained @types/reveal.js. If you were using those types, here's how the types map:

@types/reveal.jsreveal.js 6.0
Reveal.ApiRevealApi
Reveal.OptionsRevealConfig
Reveal.PluginDefinitionRevealPlugin

Upgrading From Version 3 to 4.0

We make a strong effort to avoid breaking changes but there are a couple in version 4.0. If you want to migrate an existing presentation follow these instructions.

Update Asset Locations

Our JS and CSS assets have moved. In your presentation HTML, update the following <script> and <link> paths:

Old locationNew location
js/reveal.jsdist/reveal.js
css/reset.cssdist/reset.css
css/reveal.cssdist/reveal.css
css/theme/<theme-name>.cssdist/theme/<theme-name>.css
lib/css/monokai.cssplugin/highlight/monokai.css
lib/js/head.min.jsDeleted in 3.8.0

Remove Print CSS from <head>

In your presentation HTML, remove the following script from the <head>. These styles are now baked into the reveal.css file.

<script>
  var link = document.createElement('link');
  link.rel = 'stylesheet';
  link.type = 'text/css';
  link.href = window.location.search.match(/print-pdf/gi)
    ? 'css/print/pdf.css'
    : 'css/print/paper.css';
  document.getElementsByTagName('head')[0].appendChild(link);
</script>

Plugin Registration

If you keep a copy of the v3 /plugin directory there are no breaking changes. If you want to switch to the latest plugin versions, you'll need to update your Reveal.initialize() call to use the new plugin registration syntax. Plugins are also available as ES modules.

<script src="dist/reveal.js"></script>
<script src="plugin/markdown/markdown.js"></script>
<script src="plugin/highlight/highlight.js"></script>
<script>
  Reveal.initialize({
    plugins: [RevealMarkdown, RevealHighlight],
  });
</script>

Removed Multiplex and Notes Server

The Multiplex and Notes Server plugins have moved out of reveal.js core to their own repositories. See their corresponding README's for usage instructions.

Other

  • Removed Reveal.navigateTo, use Reveal.slide instead.
  • We've switched build systems to gulp & rollup. Make sure to npm install to get the latest dependencies. The server is still started with npm start, just like before.