grunt-rollup2

Geschreven op 14 december 2018 door Harmen Siedsma

grunt-rollup2 is an integration between Rollup and Grunt, with the ability to compile multiple bundles. You can find the module here https://www.npmjs.com/package/grunt-rollup2

The module is designed to be easy to use and be compatible with future versions of Rollup.

Here is an example on how to use it:

const rollup = require('rollup')
const babel = require('rollup-plugin-babel')

module.exports = function(grunt) {
  grunt.initConfig({
    rollup: {
      prod: {
        options: {
          bundles: [
            {
              input: {
                input: 'src/index.js'
                plugins: () => [
                  babel()
                ],
              },
              output: {
                file: 'dist/build.js'
              }
            }
          ],
          rollup: rollup,
        },
      },
    },
  });
};

Reactie toevoegen

Plaats hier uw naam.