Rollup Library Starter

This page summarizes the projects mentioned and recommended in the original post on dev.to

SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
  • awesome

    ⚡️ Delightful Rollup Plugins, Packages, and Resources (by rollup)

  • 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.

  • rollup-library-starter

    Starter template for building JavaScript libraries using Rollup

  • // ./rollup.config.js // ... const outputOptions = { exports: 'named', preserveModules: true, banner: `/* * Rollup Library Starter * https://github.com/mryechkin/rollup-library-starter * (c) Mykhaylo Ryechkin (@mryechkin) */`, };

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • plugins

    🍣 The one-stop shop for official Rollup plugins (by rollup)

  • Next, we need to tell Rollup which of the modules used in our code are external to our library. Together with @rollup/plugin-node-resolve, this ensures that Rollup doesn't bundle those dependencies into our final bundle. The function makeExternalPredicate() generates the list of package names specified in dependencies and peerDependencies in package.json. All credit for this and a big thank you goes out to Mateusz Burzyński for providing it in this issue:

  • tsdx

    Zero-config CLI for TypeScript package development

  • NOTE: If your project uses TypeScript, I would suggest using tsdx instead.

  • rollup-plugin-terser

    Discontinued Rollup plugin to minify generated bundle

  • 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.

  • terser

    🗜 JavaScript parser, mangler and compressor toolkit for ES6+

  • 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.

  • Rollup

    Next-generation ES module bundler

  • In this post we'll take a look at how to package your JavaScript library code into a production-ready bundle using Rollup module bundler. By the end of this tutorial we will have a dual-module format bundle that is ready to be published to NPM, can be consumed in either server or browser environments, and is available in both ESM and CommonJS formats.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • rollup-plugin-analyzer

    Mad metrics for your rollup bundles, know all the things

  • Lastly, we have rollup-plugin-analyzer. This plugin will print out some useful info about our generated bundle upon sucessfull builds:

  • babel-sublime

    Syntax definitions for ES6 JavaScript with React JSX extensions.

  • We'll be using Babel to transpile our code into JavaScript that all current and older browsers and environments will understand. For this, install @babel/runtime as a dependency. This will be our only production dependency, and will let Rollup bundle some of the helper functions required for backwards compatibility:

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • I created a template for React packages that are very easy to publish to NPM

    3 projects | /r/reactjs | 19 Aug 2021
  • What does it take to support Node.js ESM?

    9 projects | dev.to | 12 Aug 2021
  • How bundle TS app for both ES6 and CommonJS consumption?

    3 projects | /r/typescript | 5 Jun 2021
  • How to Setup a TypeScript project using Rollup.js

    3 projects | dev.to | 19 Jan 2021
  • Sveltekit + NativeScript + Vite? Maybe +SvelteNative?

    1 project | /r/sveltejs | 4 Dec 2023