snowpack-bundle-rollup
Snowpack plugin for bundling to production using Rollup
Usage
npm install --save-dev @intrnl/snowpack-bundle-rollup
# pnpm install --save-dev @intrnl/snowpack-bundle-rollup
# yarn add --dev @intrnl/snowpack-bundle-rollup
// snowpack.config.js
export default {
// ...
buildOptions: {
// This is recommended.
clean: true,
},
plugins: [
['@intrnl/snowpack-bundle-rollup', {
// See below for options.
}],
],
};
Options
-
entrypoints?: string | string[]
Glob pattern for matching HTML files that are used as entrypoints, defaults to matching all HTML files -
assetsDir?: string
Where assets like JS and CSS lives, defaults to_assets
-
modulesDir?: false | string
Where your web modules lives, this is relative to the assets directory, defaults tomodules
, passfalse
to bundle the modules directly. -
minify?: boolean
Whether to minify the resulting bundle, defaults tofalse
-
keepBuildFiles?: boolean
Whether to keep the source files that are used during bundling, defaults tofalse
-
modifyRollupOptions?: ({ input: InputOptions, output: OutputOptions }) => void
An escape hatch allowing mutation of the Rollup options used by this plugin