rollup-plugin-terser
awesome
rollup-plugin-terser | awesome | |
---|---|---|
2 | 3 | |
615 | 2,446 | |
- | 1.1% | |
0.0 | 1.5 | |
over 1 year ago | 7 days ago | |
JavaScript | ||
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
rollup-plugin-terser
-
Rollup Library Starter
This next one will help us reduce final bundle size by minifying the generated code. It's called rollup-plugin-terser and uses terser under the hood to minify the code.
-
Setting Up a JavaScript Build Process using Rollup
Generating a bundle that has many dependencies, from our code or third-party packages, will result in a large JavaScript file. To optimize the bundle it is useful to integrate Terser into our build process. What Terser does is it removes comments, shorten variables names, cut whitespaces and minify our code to make it the shortest possible. Again Terser can be integrated with Rollup using a plugin:
awesome
-
Rollup Library Starter
Keep in mind, this configuration is meant to be the foundation for your library, but not necessarily its final form. It serves as a starting point, but there's lots more you can do here with all the plugins available in the Rollup ecosystem. Make sure to explore the awesome curated selection, and see if there's anything else that is applicable to your project.
-
The Ultimate Guide to Getting Started with the Rollup.js JavaScript Bundler
For more information, refer to the Rollupjs.org website. The big list of Rollup.js options describes all the command line switches and you can browse the awesome list of Rollup.js plugins. You'll find dozens of plugins for building and optimizing HTML, CSS, files, images, TypeScript, data URIs, code quality, and more. You can also integrate Rollup.js with Deno, Grunt, Gulp, React, Angular, Vue, and Svelte projects. I recommend you keep your configuration simple at first then add further configuration options as your knowledge of Rollup.js grows.
-
How to Set Up a Svelte App with Rollup
There's so much more you can configure (CSS/preprocessor support, various config differences in production versus dev, a wide ecosystem of very cool plugins), so hopefully this post has helped you dip your toe in and actually understand the Svelte/Rollup process enough to keep configuring it to your heart's desire!
What are some alternatives?
browserslist - 🦔 Share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-preset-env
rollup-plugin-analyzer - Mad metrics for your rollup bundles, know all the things
rollup-plugin-postcss - Seamless integration between Rollup and PostCSS.
template - Template for building basic applications with Svelte
autoprefixer - Parse CSS and add vendor prefixes to rules by Can I Use
terser - 🗜 JavaScript parser, mangler and compressor toolkit for ES6+
Less - Leaner CSS, in your browser or Ruby (via less.js).
tsdx - Zero-config CLI for TypeScript package development
d3 - Bring data to life with SVG, Canvas and HTML. :bar_chart::chart_with_upwards_trend::tada:
Snowpack - ESM-powered frontend build tool. Instant, lightweight, unbundled development. ✌️ [Moved to: https://github.com/FredKSchott/snowpack]
rollup-library-starter - Starter template for building JavaScript libraries using Rollup
webpack - A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.