rollup-plugin-zipdir
v1.0.1
Published
Rollup plugin to zip the entire output directory
Downloads
10
Maintainers
Readme
rollup-plugin-zipdir
Rollup plugin to zip the entire output directory using fflate
.
Designed as an alternative to rollup-plugin-zip
. More info here
Installation
# pnpm
pnpm add rollup-plugin-zipdir -D
# yarn
yarn add rollup-plugin-zipdir -D
# npm
npm i rollup-plugin-zipdir -D
Usage
// rollup.config.js
import zipDir from 'rollup-plugin-zipdir';
export default {
input: 'src/index.js',
output: {
dir: 'build',
format: 'esm',
},
plugins: [
// zipDir should be the last plugin
zipDir({
outputDir: 'dist',
}),
],
};
Inspiration
Designed as an alternative to rollup-plugin-zip
. Main differences:
- Uses
fflate
instead ofyazl
- Reads files from the output directory itself (on disk), rather than the Rollup-provided assets
- Operates as late as possible in the Rollup output generation phase