Last active
December 4, 2018 08:35
-
-
Save katyo/bbc5b6151e155877879d290b86ac7b15 to your computer and use it in GitHub Desktop.
rollup-plugin-visualizer crash when rollup-plugin-gzip used
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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