🌐
GitHub
github.com › MidoAhmed › rollup-react-library-starter
GitHub - MidoAhmed/rollup-react-library-starter: Template and quick-starter to create modern React library using Rollup. · GitHub
Template and quick-starter to create modern React library using Rollup. - MidoAhmed/rollup-react-library-starter
Starred by 50 users
Forked by 9 users
Languages   JavaScript 50.8% | TypeScript 41.8% | CSS 6.9% | SCSS 0.5%
🌐
Codefeetime
codefeetime.com › post › rollup-config-for-react-component-library-with-typescript-scss
Rollup Config for React Component Library With TypeScript + SCSS
After using both Rollup and Webpack to build a React component library that uses TypeScript and SCSS... I've gotta say, just freakin use Rollup for this purpose.
Discussions

How do I configure Rollup for a React Component Library?
I'm trying to configure Rollup for a React component library (using v3), and am having a real fight. I don't know exactly what I'm doing, but chasing each error just leads to another error. I'm con... More on stackoverflow.com
🌐 stackoverflow.com
Using Rollup for a React Component Library
I am beginning to learn a bit about bundling as I am working on updating a small, internal React component library which uses Rollup. Current State Right now, all of the components are being bund... More on stackoverflow.com
🌐 stackoverflow.com
Trying to create component library using react

You need to be importing react in your components.

More on reddit.com
🌐 r/reactjs
2
3
December 30, 2022
Component libraries built with Rollup aren’t tested?

I built our company's component lib (and a few others) and it's good you're thinking about this.

For the un-bundled lib:

  • Unit tests (where they provide value only)

  • Visual regression tests (very very useful, especially if you have a number of consumers)

Bundled lib:

  • Imported into a test app (this is just a lightweight app in a separate workspace within the UI lib repo) which consumes all exports, including types

  • Test app is then built and type-checked

All of this runs on CI very quickly

More on reddit.com
🌐 r/reactjs
7
5
December 8, 2023
🌐
DEV Community
dev.to › siddharthvenkatesh › component-library-setup-with-react-typescript-and-rollup-onj
Component library setup with React, TypeScript and Rollup - DEV Community
May 18, 2022 - This is by no means a comprehensive or perfect way to setup a component library. This is just a basic setup to get started and learn about bundling in the process. The next step in this process would be to add tests and tooling like Storybook or Styleguidist. ... Thanks for reading! Cheers! ... import resolve from "@rollup/plugin-node-resolve"; import commonjs from "@rollup/plugin-commonjs"; import typescript from "@rollup/plugin-typescript"; import { terser } from "rollup-plugin-terser"; import external from "rollup-plugin-peer-deps-external"; import postcssPlugin from "rollup-plugin-postcss"
🌐
GitHub
github.com › jaebradley › example-rollup-react-component-npm-package
GitHub - jaebradley/example-rollup-react-component-npm-package: Example React Component, Published to npm
Example React component "library" using rollup that is published to npm.
Starred by 177 users
Forked by 23 users
Languages   JavaScript 99.4% | CSS 0.6% | JavaScript 99.4% | CSS 0.6%
🌐
Harvey Delaney
blog.harveydelaney.com › creating-your-own-react-component-library
Creating a React Component Library using Rollup, Typescript, Sass and Storybook
November 3, 2020 - Learn how how you can quickly and easily set up your own React Component library using Rollup, TypeScript, Sass and Storybook.
🌐
Stack Overflow
stackoverflow.com › questions › 74205495 › how-do-i-configure-rollup-for-a-react-component-library
How do I configure Rollup for a React Component Library?
This can be accomplished via regex (external: [/@babel/runtime/]) or a function (external: id => id.includes('@babel/runtime')). It's important to not only specify external: ['@babel/runtime'] since the helpers are imported from nested paths (e.g @babel/runtime/helpers/get) and Rollup will only exclude modules that match strings exactly. So as I'm trying to create a component library I added: const babelPluginTransformRuntime = require("@babel/plugin-transform-runtime"); ... plugins: [ babelPluginTransformRuntime, resolve(), jsx({ factory: "React.createElement" }), commonjs(), babel({ exclude: "node_modules/**", babelHelpers: "runtime", extensions: [".js", ".jsx"], }), postcss(), peerDepsExternal(), ]
🌐
GitHub
github.com › KaiHotz › react-rollup-boilerplate
GitHub - KaiHotz/react-rollup-boilerplate: A modern, production-ready boilerplate for building React component libraries. This project provides a complete development environment with Rollup bundling, TypeScript support, Storybook for component documentation, and comprehensive testing setup.
A modern, production-ready boilerplate for building React component libraries. This project provides a complete development environment with Rollup bundling, TypeScript support, Storybook for component documentation, and comprehensive testing setup.
Starred by 312 users
Forked by 68 users
Languages   TypeScript 57.5% | JavaScript 34.7% | SCSS 7.8% | TypeScript 57.5% | JavaScript 34.7% | SCSS 7.8%
🌐
Medium
medium.com › @toukirraju › building-a-react-component-library-with-typescript-rollup-and-storybook-9f480d828867
Building a React Component Library with TypeScript, Rollup, and Storybook | by Toukir Raju | Medium
June 5, 2024 - Dependencies: Includes dependencies required for development and runtime: Rollup and its plugins for bundling and compiling TypeScript. Storybook and its add-ons for developing and showcasing UI components. React and React DOM for building React components. TypeScript for adding static typing to JavaScript. Peer Dependencies: Lists React as a peer dependency, indicating that the consuming project must have React installed. Overall, this package.json file sets up a React component library with Rollup for bundling, Storybook for component development, and TypeScript for type safety, catering to both development and production needs.
Find elsewhere
🌐
Rapidcanvas
rapidcanvas.ai › home › blogs › creating a robust react component library with rollup, typescript, and storybook
Creating a Robust React Component Library with Rollup, TypeScript, and Storybook
June 25, 2024 - These plugins work together to provide a comprehensive setup for bundling a React component library with TypeScript support, handling various module formats, transpiling code with Babel, processing CSS with PostCSS, and excluding peer dependencies from the bundle. ... Create the main Rollup configuration file rollup.config.js that imports the base configuration and adds specific settings for your library:
🌐
GitHub
gist.github.com › BenjaminWFox › 567fd293013090ec565b61228088087a
Basic Rollup Configuration for a React Component Library · GitHub
Basic Rollup Configuration for a React Component Library - [react-component-library] rollup.config.js
🌐
GitHub
github.com › HarveyD › react-component-library
GitHub - HarveyD/react-component-library: A project skeleton to get your very own React Component Library up and running using Rollup, Typescript, SASS + Storybook
A project skeleton to get your very own React Component Library up and running using Rollup, Typescript, SASS + Storybook - GitHub - HarveyD/react-component-library: A project skeleton to get your...
Starred by 786 users
Forked by 160 users
Languages   JavaScript 70.1% | TypeScript 23.1% | CSS 6.8% | JavaScript 70.1% | TypeScript 23.1% | CSS 6.8%
🌐
Stack Overflow
stackoverflow.com › questions › 53722817 › using-rollup-for-a-react-component-library
Using Rollup for a React Component Library
You provide a minified tree-shook bundled UMD with your entire library for ease of use for e.g. development/experimentation/CDN, but have the source be ES6 modules. Anybody who cares about payload size is already going to have a minificatio...
🌐
React Resources
reactresources.com › topics › rollup
Using Rollup With React | React Resources
Rollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a library or application. More info · Guide to building a React components library with Rollup and styled-jsx (medium.com)
🌐
npm
npmjs.com › package › @jaebradley › example-rollup-react-component-npm-package
@jaebradley/example-rollup-react-component-npm-package - npm
March 2, 2023 - Example React Component for npm Publication using Rollup. Latest version: 2.0.19, last published: 3 years ago. Start using @jaebradley/example-rollup-react-component-npm-package in your project by running `npm i @jaebradley/example-rollup-react-component-npm-package`. There are no other projects in the npm registry using @jaebradley/example-rollup-react-component-npm-package.
      » npm install @jaebradley/example-rollup-react-component-npm-package
    
Published   Mar 02, 2023
Version   2.0.19
Author   jae.b.bradley@gmail.com
🌐
DEV Community
dev.to › vvkkumar06 › setup-rollup-for-react-library-project-2024-3jea
Setup rollup for React Library project - 2024 - DEV Community
January 7, 2024 - Before we proceed, we will install basic libraries we need to transpile our react code. npm i -D babel-core babel-loader @babel/preset-react · Install these plugins as devDependencies @rollup/plugin-babel @rollup/plugin-node-resolve rollup-plugin-peer-deps-external @rollup/plugin-commonjs @rollup/plugin-terser
🌐
Medium
medium.com › @tomaszmularczyk89 › guide-to-building-a-react-components-library-with-rollup-and-styled-jsx-694ec66bd2
Guide to building a React components library with Rollup and styled-jsx. | by Tomek Mularczyk | Medium
July 11, 2019 - Guide to building a React components library with Rollup and styled-jsx. I have been working on a component library for React. I styled my component with styled-jsx — a simple CSS in JS library …
🌐
JavaScript in Plain English
javascript.plainenglish.io › tutorial-create-your-own-component-library-with-react-and-rollup-b8978d885297
Create Your Own Component Library With React & Rollup | by Aatif Bandey | JavaScript in Plain English
July 29, 2024 - Create Your Own Component Library With React & Rollup A tutorial on creating your own component library to better manage your team’s code. As a software engineer, we love using components, as they …
🌐
Plain English
plainenglish.io › blog › react-component-library-with-ts-and-rollup-77aca0c727bf
Build Your React Component Library with TypeScript and Rollup
February 14, 2022 - If you did not change or add, the build script in your package.json, or had tsc in your build script, it is time to change it so that rollup can take over. There are a few things that are needed for our library to work properly. With reference to the directory structure shown earlier, these few fields are a must in our package.json. main - location of the entry file for this library. ... peerDependencies - since using this library will naturally need React, it is best to place the version that our library uses as a peerDependency, just to avoid any conflicts with the version that the user might be using.
🌐
Medium
medium.com › grandata-engineering › how-i-set-up-a-react-component-library-with-rollup-be6ccb700333
How I set-up a React component library with Rollup | by Jebus | Grandata Engineering | Medium
October 2, 2017 - The next step was to configure Babel with Rollup because I was writing my component with ES6 syntax. // rollup.config.js// node-resolve will resolve all the node dependencies import resolve from 'rollup-plugin-node-resolve'; import babel from 'rollup-plugin-babel';export default { input: 'src/index.js', output: { file: 'dist/bundle.js', format: 'cjs' }, // All the used libs needs to be here external: [ 'react', 'react-proptypes' ], plugins: [ resolve(), babel({ exclude: 'node_modules/**' }) ] }
🌐
Medium
medium.com › @imrancodes › steps-to-create-a-react-component-library-b9eeeff40ce3
Steps to Create a React Component Library | by Imran Codes | Medium
April 6, 2024 - Component Dependencies and Export: Installing necessary dependencies and exporting components. Module Bundler Setup with Rollup: Installing and configuring Rollup for bundling. Library Configuration and Testing: Updating package.json and configuring Jest for testing.