Skip to content

Instantly share code, notes, and snippets.

@katyo
Last active December 4, 2018 08:35
Show Gist options
  • Save katyo/bbc5b6151e155877879d290b86ac7b15 to your computer and use it in GitHub Desktop.
Save katyo/bbc5b6151e155877879d290b86ac7b15 to your computer and use it in GitHub Desktop.
rollup-plugin-visualizer crash when rollup-plugin-gzip used
export function main() {}
{
"name": "rollup-plugin-visualizer-crash",
"version": "0.0.0",
"description": "Crashing with rollup-plugin-gzip",
"main": "index.js",
"scripts": {
"test": "rollup -c"
},
"author": "",
"license": "ISC",
"devDependencies": {
"node-zopfli": "^2.0.2",
"rollup": "^0.67.4",
"rollup-plugin-gzip": "^2.0.0",
"rollup-plugin-visualizer": "^0.9.2"
}
}
import gzip from 'rollup-plugin-gzip';
import visualize from 'rollup-plugin-visualizer';
import { compress } from 'node-zopfli';
export default {
context: 'this',
input: 'index.js',
output: {
file: 'index.min.js',
format: 'cjs',
sourcemap: true
},
plugins: [
gzip({
customCompression: content => compress(Buffer.from(content), 'deflate'),
}),
visualize({
//sourcemap: true
}),
],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment