The purpose of this plugin is to bundle modules together using Rollup. This plugin is part of the Skeletor ecosystem. To learn more about Skeletor, go here.
Install this plugin into your Skeletor-equipped project via the following terminal command:
npm install --save-dev @deg-skeletor/plugin-rollup
The configuration for this plugin mimics the standard configuration patterns for Rollup (learn more here).
{
input: "source/js/main.js",
output: [
{
file: "dist/js/main-bundle.js",
format: "es"
},
{
file: "dist/js/main-bundle-nomodule.js",
format: "system"
}
],
plugins: [
require('rollup-plugin-babel')({
exclude: 'node_modules/**'
}),
require('rollup-plugin-node-resolve')({
browser: true
}),
require('rollup-plugin-commonjs')()
]
}
[
{
input: "source/js/entryA.js",
output: [{
file: "dist/js/entryA-bundle.js",
format: "es"
}]
},
{
input: "source/js/entryB.js",
output: [{
file: "dist/js/entryB-bundle.js",
format: "es"
}]
}
]
{
input: ["source/js/entryA.js", "source/js/entryB.js"],
output: [
{
dir: "dist/js",
format: "es"
},
{
dir: "dist/js/nomodule",
format: "system"
}
}]
}
For a detailed list of configuration options, check out Rollup's big list of options.