node package manager
Painless code sharing. npm Orgs help your team discover, share, and reuse code. Create a free org »


CKEditor 5 Rollup bundler task

Gulp task which can be used to build a CKEditor 5 bundle using Rollup.

More information about development tools packages can be found at the following URL:


npm i --save-dev @ckeditor/ckeditor5-dev-bundler-rollup

To include development tasks in your gulpfile.js:

const gulp = require( 'gulp' );
gulp.task( 'build', () => {
    const bundler = require( '@ckeditor/ckeditor5-dev-bundler-rollup' );
    return getBuildOptions() );
} );
function getBuildOptions() {
    const minimist = require( 'minimist' );
    const pathToConfig = minimist( process.argv.slice( 2 ) ).config || './build-config';
    return {
        packages: getCKEditor5PackagesPaths(),
        buildConfig: require( path.resolve( '.', pathToConfig ) ),
function getCKEditor5PackagesPaths() {
    const compiler = require( '@ckeditor/ckeditor5-dev-compiler' );
    return compiler.utils.getPackages( '.' );

Build config options:

  • destinationPath - Path where the editor files will be saved.
  • rollupOptions - Rollup options.
  • [entryPoint] - Path to the entry point.
  • [editor] - Path to the editor theme.
  • [plugins] - List of the CKEditor plugins.

If the entry point is provided, then editor and plugins options are ignored.

Minimum Rollup options:

  • moduleName - Name of CKEditor instance exposed as global variable by a bundle.
  • format - The format of the generated bundle (iife is default).

Sample build config:

'use strict';
module.exports = {
    destinationPath: './build/dist/',
    editor: 'editor-classic/classic'
    plugins: [
    rollupOptions: {
        moduleName: 'ClassicEditor',
        format: 'iife',


See the file.


Licensed under the GPL, LGPL and MPL licenses, at your choice. For full details about the license, please check the file.