npm version node compatibility install size code coverage backers sponsors license Join the chat at https://is.gd/rollup_chat

Rollup

Overview

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. It uses the standardized ES module format for code, instead of previous idiosyncratic solutions such as CommonJS and AMD. ES modules let you freely and seamlessly combine the most useful individual functions from your favorite libraries. Rollup can optimize ES modules for faster native loading in modern browsers, or output a legacy module format allowing ES module workflows today.

Quick Start Guide

Install with npm install --global rollup. Rollup can be used either through a command line interface with an optional configuration file or else through its JavaScript API. Run rollup --help to see the available options and parameters. The starter project templates, rollup-starter-lib and rollup-starter-app, demonstrate common configuration options, and more detailed instructions are available throughout the user guide.

Commands

These commands assume the entry point to your application is named main.js, and that you'd like all imports compiled into a single file named bundle.js.

For browsers:

# compile to a <script> containing a self-executing function
rollup main.js --format iife --name "myBundle" --file bundle.js

For Node.js:

# compile to a CommonJS module
rollup main.js --format cjs --file bundle.js

For both browsers and Node.js:

# UMD format requires a bundle name
rollup main.js --format umd --name "myBundle" --file bundle.js

Why

Developing software is usually easier if you break your project into smaller separate pieces, since that often removes unexpected interactions and dramatically reduces the complexity of the problems you'll need to solve, and simply writing smaller projects in the first place isn't necessarily the answer. Unfortunately, JavaScript has not historically included this capability as a core feature in the language.

This finally changed with ES modules support in JavaScript, which provides a syntax for importing and exporting functions and data so they can be shared between separate scripts. Most browsers and Node.js support ES modules. However, Node.js releases before 12.17 support ES modules only behind the --experimental-modules flag, and older browsers like Internet Explorer do not support ES modules at all. Rollup allows you to write your code using ES modules, and run your application even in environments that do not support ES modules natively. For environments that support them, Rollup can output optimized ES modules; for environments that don't, Rollup can compile your code to other formats such as CommonJS modules, AMD modules, and IIFE-style scripts. This means that you get to write future-proof code, and you also get the tremendous benefits of...

Tree Shaking

In addition to enabling the use of ES modules, Rollup also statically analyzes and optimizes the code you are importing, and will exclude anything that isn't actually used. This allows you to build on top of existing tools and modules without adding extra dependencies or bloating the size of your project.

For example, with CommonJS, the entire tool or library must be imported.

// import the entire utils object with CommonJS
var utils = require('node:utils');
var query = 'Rollup';
// use the ajax method of the utils object
utils.ajax('https://api.example.com?search=' + query).then(handleResponse);

But with ES modules, instead of importing the whole utils object, we can just import the one ajax function we need:

// import the ajax function with an ES import statement
import { ajax } from 'node:utils';

var query = 'Rollup';
// call the ajax function
ajax('https://api.example.com?search=' + query).then(handleResponse);

Because Rollup includes the bare minimum, it results in lighter, faster, and less complicated libraries and applications. Since this approach is based on explicit import and export statements, it is vastly more effective than simply running an automated minifier to detect unused variables in the compiled output code.

Compatibility

Importing CommonJS

Rollup can import existing CommonJS modules through a plugin.

Publishing ES Modules

To make sure your ES modules are immediately usable by tools that work with CommonJS such as Node.js and webpack, you can use Rollup to compile to UMD or CommonJS format, and then point to that compiled version with the main property in your package.json file. If your package.json file also has a module field, ES-module-aware tools like Rollup and webpack will import the ES module version directly.

Contributors

This project exists thanks to all the people who contribute. [Contribute]. . If you want to contribute yourself, head over to the contribution guidelines.

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

Special Sponsor

TNG Logo

TNG has been supporting the work of Lukas Taegert-Atkinson on Rollup since 2017.

License

MIT

rollup/rollup

{
"props": {
"initialPayload": {
"allShortcutsEnabled": false,
"path": "/",
"repo": {
"id": 35640229,
"defaultBranch": "master",
"name": "rollup",
"ownerLogin": "rollup",
"currentUserCanPush": false,
"isFork": false,
"isEmpty": false,
"createdAt": "2015-05-14T22:26:28.000Z",
"ownerAvatar": "https://avatars.githubusercontent.com/u/12554859?v=4",
"public": true,
"private": false,
"isOrgOwned": true
},
"currentUser": null,
"refInfo": {
"name": "master",
"listCacheKey": "v0:1713761683.0",
"canEdit": false,
"refType": "branch",
"currentOid": "a80117f528fafa3194cdab58dddfabbf7d9ceb4f"
},
"tree": {
"items": [
{
"name": ".github",
"path": ".github",
"contentType": "directory"
},
{
"name": ".husky",
"path": ".husky",
"contentType": "directory"
},
{
"name": ".vscode",
"path": ".vscode",
"contentType": "directory"
},
{
"name": "browser",
"path": "browser",
"contentType": "directory"
},
{
"name": "build-plugins",
"path": "build-plugins",
"contentType": "directory"
},
{
"name": "cli",
"path": "cli",
"contentType": "directory"
},
{
"name": "docs",
"path": "docs",
"contentType": "directory"
},
{
"name": "npm",
"path": "npm",
"contentType": "directory"
},
{
"name": "rust",
"path": "rust",
"contentType": "directory"
},
{
"name": "scripts",
"path": "scripts",
"contentType": "directory"
},
{
"name": "src",
"path": "src",
"contentType": "directory"
},
{
"name": "test",
"path": "test",
"contentType": "directory"
},
{
"name": "typings",
"path": "typings",
"contentType": "directory"
},
{
"name": "wasm",
"path": "wasm",
"contentType": "directory"
},
{
"name": ".editorconfig",
"path": ".editorconfig",
"contentType": "file"
},
{
"name": ".eslintrc.js",
"path": ".eslintrc.js",
"contentType": "file"
},
{
"name": ".gitattributes",
"path": ".gitattributes",
"contentType": "file"
},
{
"name": ".gitignore",
"path": ".gitignore",
"contentType": "file"
},
{
"name": ".lintstagedrc.js",
"path": ".lintstagedrc.js",
"contentType": "file"
},
{
"name": ".nycrc",
"path": ".nycrc",
"contentType": "file"
},
{
"name": ".prettierignore",
"path": ".prettierignore",
"contentType": "file"
},
{
"name": ".prettierrc.json",
"path": ".prettierrc.json",
"contentType": "file"
},
{
"name": "ARCHITECTURE.md",
"path": "ARCHITECTURE.md",
"contentType": "file"
},
{
"name": "CHANGELOG.md",
"path": "CHANGELOG.md",
"contentType": "file"
},
{
"name": "CODE_OF_CONDUCT.md",
"path": "CODE_OF_CONDUCT.md",
"contentType": "file"
},
{
"name": "CONTRIBUTING.md",
"path": "CONTRIBUTING.md",
"contentType": "file"
},
{
"name": "LICENSE-CORE.md",
"path": "LICENSE-CORE.md",
"contentType": "file"
},
{
"name": "LICENSE.md",
"path": "LICENSE.md",
"contentType": "file"
},
{
"name": "README.md",
"path": "README.md",
"contentType": "file"
},
{
"name": "codecov.yml",
"path": "codecov.yml",
"contentType": "file"
},
{
"name": "markdownlint.json",
"path": "markdownlint.json",
"contentType": "file"
},
{
"name": "native.d.ts",
"path": "native.d.ts",
"contentType": "file"
},
{
"name": "native.js",
"path": "native.js",
"contentType": "file"
},
{
"name": "native.wasm.js",
"path": "native.wasm.js",
"contentType": "file"
},
{
"name": "package-lock.json",
"path": "package-lock.json",
"contentType": "file"
},
{
"name": "package.json",
"path": "package.json",
"contentType": "file"
},
{
"name": "renovate.json",
"path": "renovate.json",
"contentType": "file"
},
{
"name": "rollup.config.ts",
"path": "rollup.config.ts",
"contentType": "file"
},
{
"name": "tsconfig.json",
"path": "tsconfig.json",
"contentType": "file"
}
],
"templateDirectorySuggestionUrl": null,
"readme": null,
"totalCount": 39,
"showBranchInfobar": false
},
"fileTree": null,
"fileTreeProcessingTime": null,
"foldersToFetch": [],
"treeExpanded": false,
"symbolsExpanded": false,
"isOverview": true,
"overview": {
"banners": {
"shouldRecommendReadme": false,
"isPersonalRepo": false,
"showUseActionBanner": false,
"actionSlug": null,
"actionId": null,
"showProtectBranchBanner": false,
"publishBannersInfo": {
"dismissActionNoticePath": "/settings/dismiss-notice/publish_action_from_repo",
"releasePath": "/rollup/rollup/releases/new?marketplace=true",
"showPublishActionBanner": false
},
"interactionLimitBanner": null,
"showInvitationBanner": false,
"inviterName": null
},
"codeButton": {
"contactPath": "/contact",
"isEnterprise": false,
"local": {
"protocolInfo": {
"httpAvailable": true,
"sshAvailable": null,
"httpUrl": "https://github.com/rollup/rollup.git",
"showCloneWarning": null,
"sshUrl": null,
"sshCertificatesRequired": null,
"sshCertificatesAvailable": null,
"ghCliUrl": "gh repo clone rollup/rollup",
"defaultProtocol": "http",
"newSshKeyUrl": "/settings/ssh/new",
"setProtocolPath": "/users/set_protocol"
},
"platformInfo": {
"cloneUrl": "https://desktop.github.com",
"showVisualStudioCloneButton": false,
"visualStudioCloneUrl": "https://windows.github.com",
"showXcodeCloneButton": false,
"xcodeCloneUrl": "https://developer.apple.com",
"zipballUrl": "/rollup/rollup/archive/refs/heads/master.zip"
}
},
"newCodespacePath": "/codespaces/new?hide_repo_select=true&repo=35640229"
},
"popovers": {
"rename": null,
"renamedParentRepo": null
},
"commitCount": "5,594",
"overviewFiles": [
{
"displayName": "README.md",
"repoName": "rollup",
"refName": "master",
"path": "README.md",
"preferredFileType": "readme",
"tabName": "README",
"richText": "<article class=\"markdown-body entry-content container-lg\" itemprop=\"text\"><p align=\"center\" dir=\"auto\">\n\t<a href=\"https://rollupjs.org/\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/66fb417bb4152304eede584506848c6cc0b437e17b55b6502a2391ac1006cfc0/68747470733a2f2f726f6c6c75706a732e6f72672f726f6c6c75702d6c6f676f2e737667\" width=\"150\" data-canonical-src=\"https://rollupjs.org/rollup-logo.svg\" style=\"max-width: 100%;\"></a>\n</p>\n<p align=\"center\" dir=\"auto\">\n <a href=\"https://www.npmjs.com/package/rollup\" rel=\"nofollow\">\n <img src=\"https://camo.githubusercontent.com/f99c9aae090873ae9ab1fb840db3ac7028c61369c7941b26474ab18e8e0e5520/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f726f6c6c75702e737667\" alt=\"npm version\" data-canonical-src=\"https://img.shields.io/npm/v/rollup.svg\" style=\"max-width: 100%;\">\n </a>\n <a href=\"https://nodejs.org/en/about/previous-releases\" rel=\"nofollow\">\n <img src=\"https://camo.githubusercontent.com/056b87dd789db0e0a504c03eeeb5d7397020016758485257891ff17f0d02d657/68747470733a2f2f696d672e736869656c64732e696f2f6e6f64652f762f726f6c6c75702e737667\" alt=\"node compatibility\" data-canonical-src=\"https://img.shields.io/node/v/rollup.svg\" style=\"max-width: 100%;\">\n </a>\n <a href=\"https://packagephobia.now.sh/result?p=rollup\" rel=\"nofollow\">\n <img src=\"https://camo.githubusercontent.com/097ec5fe1c955c8ebb955267f6b5df36437e438ee1b935b9bf22bc2be27a3c1e/68747470733a2f2f7061636b61676570686f6269612e6e6f772e73682f62616467653f703d726f6c6c7570\" alt=\"install size\" data-canonical-src=\"https://packagephobia.now.sh/badge?p=rollup\" style=\"max-width: 100%;\">\n </a>\n <a href=\"https://codecov.io/gh/rollup/rollup\" rel=\"nofollow\">\n <img src=\"https://camo.githubusercontent.com/b12c5cee75033cf948a3cdb6a51adaa90e77e79383b1d50361572130a0585829/68747470733a2f2f636f6465636f762e696f2f67682f726f6c6c75702f726f6c6c75702f67726170682f62616467652e737667\" alt=\"code coverage\" data-canonical-src=\"https://codecov.io/gh/rollup/rollup/graph/badge.svg\" style=\"max-width: 100%;\">\n </a>\n <a href=\"#backers\" alt=\"sponsors on Open Collective\">\n <img src=\"https://camo.githubusercontent.com/ac0aebaef33a000d1bcfaf258a33d072b11cf70c4400336cd0a7eaa1c713a89f/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f726f6c6c75702f6261636b6572732f62616467652e737667\" alt=\"backers\" data-canonical-src=\"https://opencollective.com/rollup/backers/badge.svg\" style=\"max-width: 100%;\">\n </a> \n <a href=\"#sponsors\" alt=\"Sponsors on Open Collective\">\n <img src=\"https://camo.githubusercontent.com/bd5247a72be93cefbde0b5b56c50f5af7efc97ec08becd770d1a0025d637e384/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f726f6c6c75702f73706f6e736f72732f62616467652e737667\" alt=\"sponsors\" data-canonical-src=\"https://opencollective.com/rollup/sponsors/badge.svg\" style=\"max-width: 100%;\">\n </a> \n <a href=\"https://github.com/rollup/rollup/blob/master/LICENSE.md\">\n <img src=\"https://camo.githubusercontent.com/060548f030c5373ae752f4e7d338a15994007a96b2936ec51c08059dcb225430/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f6c2f726f6c6c75702e737667\" alt=\"license\" data-canonical-src=\"https://img.shields.io/npm/l/rollup.svg\" style=\"max-width: 100%;\">\n </a>\n <a href=\"https://is.gd/rollup_chat?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge&amp;utm_content=badge\" rel=\"nofollow\">\n <img src=\"https://camo.githubusercontent.com/5758eb5c4cc04478ce20c7c71b519f9a3828f5ef98c73f313bb1f94e1cfaac22/68747470733a2f2f696d672e736869656c64732e696f2f646973636f72642f3436363738373037353531383336353730383f636f6c6f723d373738636431266c6162656c3d63686174\" alt=\"Join the chat at https://is.gd/rollup_chat\" data-canonical-src=\"https://img.shields.io/discord/466787075518365708?color=778cd1&amp;label=chat\" style=\"max-width: 100%;\">\n </a>\n</p>\n<div class=\"markdown-heading\" dir=\"auto\"><h1 align=\"center\" tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Rollup</h1><a id=\"user-content-rollup\" class=\"anchor\" aria-label=\"Permalink: Rollup\" href=\"#rollup\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Overview</h2><a id=\"user-content-overview\" class=\"anchor\" aria-label=\"Permalink: Overview\" href=\"#overview\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">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. It uses the standardized ES module format for code, instead of previous idiosyncratic solutions such as CommonJS and AMD. ES modules let you freely and seamlessly combine the most useful individual functions from your favorite libraries. Rollup can optimize ES modules for faster native loading in modern browsers, or output a legacy module format allowing ES module workflows today.</p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Quick Start Guide</h2><a id=\"user-content-quick-start-guide\" class=\"anchor\" aria-label=\"Permalink: Quick Start Guide\" href=\"#quick-start-guide\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">Install with <code>npm install --global rollup</code>. Rollup can be used either through a <a href=\"https://rollupjs.org/command-line-interface/\" rel=\"nofollow\">command line interface</a> with an optional configuration file or else through its <a href=\"https://rollupjs.org/javascript-api/\" rel=\"nofollow\">JavaScript API</a>. Run <code>rollup --help</code> to see the available options and parameters. The starter project templates, <a href=\"https://github.com/rollup/rollup-starter-lib\">rollup-starter-lib</a> and <a href=\"https://github.com/rollup/rollup-starter-app\">rollup-starter-app</a>, demonstrate common configuration options, and more detailed instructions are available throughout the <a href=\"https://rollupjs.org/introduction/\" rel=\"nofollow\">user guide</a>.</p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Commands</h3><a id=\"user-content-commands\" class=\"anchor\" aria-label=\"Permalink: Commands\" href=\"#commands\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">These commands assume the entry point to your application is named main.js, and that you'd like all imports compiled into a single file named bundle.js.</p>\n<p dir=\"auto\">For browsers:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"# compile to a &lt;script&gt; containing a self-executing function\nrollup main.js --format iife --name &quot;myBundle&quot; --file bundle.js\"><pre><span class=\"pl-c\"><span class=\"pl-c\">#</span> compile to a &lt;script&gt; containing a self-executing function</span>\nrollup main.js --format iife --name <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>myBundle<span class=\"pl-pds\">\"</span></span> --file bundle.js</pre></div>\n<p dir=\"auto\">For Node.js:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"# compile to a CommonJS module\nrollup main.js --format cjs --file bundle.js\"><pre><span class=\"pl-c\"><span class=\"pl-c\">#</span> compile to a CommonJS module</span>\nrollup main.js --format cjs --file bundle.js</pre></div>\n<p dir=\"auto\">For both browsers and Node.js:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"# UMD format requires a bundle name\nrollup main.js --format umd --name &quot;myBundle&quot; --file bundle.js\"><pre><span class=\"pl-c\"><span class=\"pl-c\">#</span> UMD format requires a bundle name</span>\nrollup main.js --format umd --name <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>myBundle<span class=\"pl-pds\">\"</span></span> --file bundle.js</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Why</h2><a id=\"user-content-why\" class=\"anchor\" aria-label=\"Permalink: Why\" href=\"#why\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">Developing software is usually easier if you break your project into smaller separate pieces, since that often removes unexpected interactions and dramatically reduces the complexity of the problems you'll need to solve, and simply writing smaller projects in the first place <a href=\"https://medium.com/@Rich_Harris/small-modules-it-s-not-quite-that-simple-3ca532d65de4\" rel=\"nofollow\">isn't necessarily the answer</a>. Unfortunately, JavaScript has not historically included this capability as a core feature in the language.</p>\n<p dir=\"auto\">This finally changed with ES modules support in JavaScript, which provides a syntax for importing and exporting functions and data so they can be shared between separate scripts. Most browsers and Node.js support ES modules. However, Node.js releases before 12.17 support ES modules only behind the <code>--experimental-modules</code> flag, and older browsers like Internet Explorer do not support ES modules at all. Rollup allows you to write your code using ES modules, and run your application even in environments that do not support ES modules natively. For environments that support them, Rollup can output optimized ES modules; for environments that don't, Rollup can compile your code to other formats such as CommonJS modules, AMD modules, and IIFE-style scripts. This means that you get to <em>write future-proof code</em>, and you also get the tremendous benefits of...</p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Tree Shaking</h2><a id=\"user-content-tree-shaking\" class=\"anchor\" aria-label=\"Permalink: Tree Shaking\" href=\"#tree-shaking\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">In addition to enabling the use of ES modules, Rollup also statically analyzes and optimizes the code you are importing, and will exclude anything that isn't actually used. This allows you to build on top of existing tools and modules without adding extra dependencies or bloating the size of your project.</p>\n<p dir=\"auto\">For example, with CommonJS, the <em>entire tool or library must be imported</em>.</p>\n<div class=\"highlight highlight-source-js notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"// import the entire utils object with CommonJS\nvar utils = require('node:utils');\nvar query = 'Rollup';\n// use the ajax method of the utils object\nutils.ajax('https://api.example.com?search=' + query).then(handleResponse);\"><pre><span class=\"pl-c\">// import the entire utils object with CommonJS</span>\n<span class=\"pl-k\">var</span> <span class=\"pl-s1\">utils</span> <span class=\"pl-c1\">=</span> <span class=\"pl-en\">require</span><span class=\"pl-kos\">(</span><span class=\"pl-s\">'node:utils'</span><span class=\"pl-kos\">)</span><span class=\"pl-kos\">;</span>\n<span class=\"pl-k\">var</span> <span class=\"pl-s1\">query</span> <span class=\"pl-c1\">=</span> <span class=\"pl-s\">'Rollup'</span><span class=\"pl-kos\">;</span>\n<span class=\"pl-c\">// use the ajax method of the utils object</span>\n<span class=\"pl-s1\">utils</span><span class=\"pl-kos\">.</span><span class=\"pl-en\">ajax</span><span class=\"pl-kos\">(</span><span class=\"pl-s\">'https://api.example.com?search='</span> <span class=\"pl-c1\">+</span> <span class=\"pl-s1\">query</span><span class=\"pl-kos\">)</span><span class=\"pl-kos\">.</span><span class=\"pl-en\">then</span><span class=\"pl-kos\">(</span><span class=\"pl-s1\">handleResponse</span><span class=\"pl-kos\">)</span><span class=\"pl-kos\">;</span></pre></div>\n<p dir=\"auto\">But with ES modules, instead of importing the whole <code>utils</code> object, we can just import the one <code>ajax</code> function we need:</p>\n<div class=\"highlight highlight-source-js notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"// import the ajax function with an ES import statement\nimport { ajax } from 'node:utils';\n\nvar query = 'Rollup';\n// call the ajax function\najax('https://api.example.com?search=' + query).then(handleResponse);\"><pre><span class=\"pl-c\">// import the ajax function with an ES import statement</span>\n<span class=\"pl-k\">import</span> <span class=\"pl-kos\">{</span> <span class=\"pl-s1\">ajax</span> <span class=\"pl-kos\">}</span> <span class=\"pl-k\">from</span> <span class=\"pl-s\">'node:utils'</span><span class=\"pl-kos\">;</span>\n\n<span class=\"pl-k\">var</span> <span class=\"pl-s1\">query</span> <span class=\"pl-c1\">=</span> <span class=\"pl-s\">'Rollup'</span><span class=\"pl-kos\">;</span>\n<span class=\"pl-c\">// call the ajax function</span>\n<span class=\"pl-en\">ajax</span><span class=\"pl-kos\">(</span><span class=\"pl-s\">'https://api.example.com?search='</span> <span class=\"pl-c1\">+</span> <span class=\"pl-s1\">query</span><span class=\"pl-kos\">)</span><span class=\"pl-kos\">.</span><span class=\"pl-en\">then</span><span class=\"pl-kos\">(</span><span class=\"pl-s1\">handleResponse</span><span class=\"pl-kos\">)</span><span class=\"pl-kos\">;</span></pre></div>\n<p dir=\"auto\">Because Rollup includes the bare minimum, it results in lighter, faster, and less complicated libraries and applications. Since this approach is based on explicit <code>import</code> and <code>export</code> statements, it is vastly more effective than simply running an automated minifier to detect unused variables in the compiled output code.</p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Compatibility</h2><a id=\"user-content-compatibility\" class=\"anchor\" aria-label=\"Permalink: Compatibility\" href=\"#compatibility\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Importing CommonJS</h3><a id=\"user-content-importing-commonjs\" class=\"anchor\" aria-label=\"Permalink: Importing CommonJS\" href=\"#importing-commonjs\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">Rollup can import existing CommonJS modules <a href=\"https://github.com/rollup/plugins/tree/master/packages/commonjs\">through a plugin</a>.</p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Publishing ES Modules</h3><a id=\"user-content-publishing-es-modules\" class=\"anchor\" aria-label=\"Permalink: Publishing ES Modules\" href=\"#publishing-es-modules\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">To make sure your ES modules are immediately usable by tools that work with CommonJS such as Node.js and webpack, you can use Rollup to compile to UMD or CommonJS format, and then point to that compiled version with the <code>main</code> property in your <code>package.json</code> file. If your <code>package.json</code> file also has a <code>module</code> field, ES-module-aware tools like Rollup and <a href=\"https://webpack.js.org/\" rel=\"nofollow\">webpack</a> will <a href=\"https://github.com/rollup/rollup/wiki/pkg.module\">import the ES module version</a> directly.</p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Contributors</h2><a id=\"user-content-contributors\" class=\"anchor\" aria-label=\"Permalink: Contributors\" href=\"#contributors\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">This project exists thanks to all the people who contribute. [<a href=\"/rollup/rollup/blob/master/CONTRIBUTING.md\">Contribute</a>]. <a href=\"https://github.com/rollup/rollup/graphs/contributors\"><img src=\"https://camo.githubusercontent.com/cda581b3316b684d703077a94bb9242ba42371a48a883a69acea4dd53cc87ebe/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f726f6c6c75702f636f6e7472696275746f72732e7376673f77696474683d383930\" data-canonical-src=\"https://opencollective.com/rollup/contributors.svg?width=890\" style=\"max-width: 100%;\"></a>. If you want to contribute yourself, head over to the <a href=\"/rollup/rollup/blob/master/CONTRIBUTING.md\">contribution guidelines</a>.</p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Backers</h2><a id=\"user-content-backers\" class=\"anchor\" aria-label=\"Permalink: Backers\" href=\"#backers\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">Thank you to all our backers! 🙏 [<a href=\"https://opencollective.com/rollup#backer\" rel=\"nofollow\">Become a backer</a>]</p>\n<p dir=\"auto\"><a href=\"https://opencollective.com/rollup#backers\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/5fa205a191e297eca2aaa5957d84a2536c9021e3e07c438029e9cd595563bc70/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f726f6c6c75702f6261636b6572732e7376673f77696474683d383930\" data-canonical-src=\"https://opencollective.com/rollup/backers.svg?width=890\" style=\"max-width: 100%;\"></a></p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Sponsors</h2><a id=\"user-content-sponsors\" class=\"anchor\" aria-label=\"Permalink: Sponsors\" href=\"#sponsors\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\">Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [<a href=\"https://opencollective.com/rollup#sponsor\" rel=\"nofollow\">Become a sponsor</a>]</p>\n<p dir=\"auto\"><a href=\"https://opencollective.com/rollup/sponsor/0/website\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/56e00077474812886692da4e47011be387be47cc198bf21b38be9192871cd01d/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f726f6c6c75702f73706f6e736f722f302f6176617461722e737667\" data-canonical-src=\"https://opencollective.com/rollup/sponsor/0/avatar.svg\" style=\"max-width: 100%;\"></a> <a href=\"https://opencollective.com/rollup/sponsor/1/website\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/72eae503b2a6abef0b80f49f50f38f03e21172cef1344ebb175fe08d31771611/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f726f6c6c75702f73706f6e736f722f312f6176617461722e737667\" data-canonical-src=\"https://opencollective.com/rollup/sponsor/1/avatar.svg\" style=\"max-width: 100%;\"></a> <a href=\"https://opencollective.com/rollup/sponsor/2/website\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/04cf3c59cfaf59ad8b44fe746fe0d90c355ba8ad40c3727525bdd337405b931b/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f726f6c6c75702f73706f6e736f722f322f6176617461722e737667\" data-canonical-src=\"https://opencollective.com/rollup/sponsor/2/avatar.svg\" style=\"max-width: 100%;\"></a> <a href=\"https://opencollective.com/rollup/sponsor/3/website\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/56619627e2c03d019778c9471cca197dd374c52b4c634a8d6e36f10ee4b46d12/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f726f6c6c75702f73706f6e736f722f332f6176617461722e737667\" data-canonical-src=\"https://opencollective.com/rollup/sponsor/3/avatar.svg\" style=\"max-width: 100%;\"></a> <a href=\"https://opencollective.com/rollup/sponsor/4/website\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/4b70b7c5e70752bcaac8f633fb02e2714a814b8349a1e34aaa5b1a696a3c842f/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f726f6c6c75702f73706f6e736f722f342f6176617461722e737667\" data-canonical-src=\"https://opencollective.com/rollup/sponsor/4/avatar.svg\" style=\"max-width: 100%;\"></a> <a href=\"https://opencollective.com/rollup/sponsor/5/website\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/494f48033e9305f916fbb929ce7da19563dafc5d0dcecfb8883d56ba74fbf0e0/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f726f6c6c75702f73706f6e736f722f352f6176617461722e737667\" data-canonical-src=\"https://opencollective.com/rollup/sponsor/5/avatar.svg\" style=\"max-width: 100%;\"></a> <a href=\"https://opencollective.com/rollup/sponsor/6/website\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/c556f66e3fba307d7b19d077e8ba4784d8a15f0f6f347a173b58e544fabc1b7a/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f726f6c6c75702f73706f6e736f722f362f6176617461722e737667\" data-canonical-src=\"https://opencollective.com/rollup/sponsor/6/avatar.svg\" style=\"max-width: 100%;\"></a> <a href=\"https://opencollective.com/rollup/sponsor/7/website\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/358577f063eec660bc6339f09d0f8e82d7a30d8f6aebc74edec41ceb9683bf29/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f726f6c6c75702f73706f6e736f722f372f6176617461722e737667\" data-canonical-src=\"https://opencollective.com/rollup/sponsor/7/avatar.svg\" style=\"max-width: 100%;\"></a> <a href=\"https://opencollective.com/rollup/sponsor/8/website\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/4049be3d8e5836c535acb167d3a2f43ba89e13f9cb94e2b0e3e9cf03f8fe8be6/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f726f6c6c75702f73706f6e736f722f382f6176617461722e737667\" data-canonical-src=\"https://opencollective.com/rollup/sponsor/8/avatar.svg\" style=\"max-width: 100%;\"></a> <a href=\"https://opencollective.com/rollup/sponsor/9/website\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/3de98e4e454b97043aee268dcb23d20c38d166ce51998dfb1b7d073d073c4c18/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f726f6c6c75702f73706f6e736f722f392f6176617461722e737667\" data-canonical-src=\"https://opencollective.com/rollup/sponsor/9/avatar.svg\" style=\"max-width: 100%;\"></a> <a href=\"https://opencollective.com/rollup/sponsor/10/website\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/33d196112a5895ed48cb489790b6f90bd4d7e888e13a0e73954e42810e469be6/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f726f6c6c75702f73706f6e736f722f31302f6176617461722e737667\" data-canonical-src=\"https://opencollective.com/rollup/sponsor/10/avatar.svg\" style=\"max-width: 100%;\"></a> <a href=\"https://opencollective.com/rollup/sponsor/11/website\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/a10f1f3d83e9a2a43c773ce4c4bfd29633851b26c9847ace46ed76f26b9d7ed2/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f726f6c6c75702f73706f6e736f722f31312f6176617461722e737667\" data-canonical-src=\"https://opencollective.com/rollup/sponsor/11/avatar.svg\" style=\"max-width: 100%;\"></a> <a href=\"https://opencollective.com/rollup/sponsor/12/website\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/43c40e03849ba7588fb6daab852cd8dce832975ae3baef14403ce21d25fd68a1/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f726f6c6c75702f73706f6e736f722f31322f6176617461722e737667\" data-canonical-src=\"https://opencollective.com/rollup/sponsor/12/avatar.svg\" style=\"max-width: 100%;\"></a> <a href=\"https://opencollective.com/rollup/sponsor/13/website\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/f422e076e05884e4bdec76f1625db5cc0a020101d1d3b4c795aebedd08adb555/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f726f6c6c75702f73706f6e736f722f31332f6176617461722e737667\" data-canonical-src=\"https://opencollective.com/rollup/sponsor/13/avatar.svg\" style=\"max-width: 100%;\"></a> <a href=\"https://opencollective.com/rollup/sponsor/14/website\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/60f1b8d9b9173743919768128a774ee4b3f46078b285c3fe848d20ed37ce681e/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f726f6c6c75702f73706f6e736f722f31342f6176617461722e737667\" data-canonical-src=\"https://opencollective.com/rollup/sponsor/14/avatar.svg\" style=\"max-width: 100%;\"></a></p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Special Sponsor</h2><a id=\"user-content-special-sponsor\" class=\"anchor\" aria-label=\"Permalink: Special Sponsor\" href=\"#special-sponsor\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\"><a href=\"https://www.tngtech.com/en/index.html\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/6152e1c193237d48a3e1a1cc68aba956ae1144d50da892893887048c8e18961b/68747470733a2f2f7777772e746e67746563682e636f6d2f66696c6561646d696e2f5075626c69632f496d616765732f4c6f676f732f544e475f4c6f676f5f6d656469756d5f3430307836342e737667\" alt=\"TNG Logo\" width=\"280\" data-canonical-src=\"https://www.tngtech.com/fileadmin/Public/Images/Logos/TNG_Logo_medium_400x64.svg\" style=\"max-width: 100%;\"></a></p>\n<p dir=\"auto\">TNG has been supporting the work of <a href=\"https://github.com/lukastaegert\">Lukas Taegert-Atkinson</a> on Rollup since 2017.</p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">License</h2><a id=\"user-content-license\" class=\"anchor\" aria-label=\"Permalink: License\" href=\"#license\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<p dir=\"auto\"><a href=\"https://github.com/rollup/rollup/blob/master/LICENSE.md\">MIT</a></p>\n</article>",
"loaded": true,
"timedOut": false,
"errorMessage": null,
"headerInfo": {
"toc": [
{
"level": 1,
"text": "Rollup",
"anchor": "rollup",
"htmlText": "Rollup"
},
{
"level": 2,
"text": "Overview",
"anchor": "overview",
"htmlText": "Overview"
},
{
"level": 2,
"text": "Quick Start Guide",
"anchor": "quick-start-guide",
"htmlText": "Quick Start Guide"
},
{
"level": 3,
"text": "Commands",
"anchor": "commands",
"htmlText": "Commands"
},
{
"level": 2,
"text": "Why",
"anchor": "why",
"htmlText": "Why"
},
{
"level": 2,
"text": "Tree Shaking",
"anchor": "tree-shaking",
"htmlText": "Tree Shaking"
},
{
"level": 2,
"text": "Compatibility",
"anchor": "compatibility",
"htmlText": "Compatibility"
},
{
"level": 3,
"text": "Importing CommonJS",
"anchor": "importing-commonjs",
"htmlText": "Importing CommonJS"
},
{
"level": 3,
"text": "Publishing ES Modules",
"anchor": "publishing-es-modules",
"htmlText": "Publishing ES Modules"
},
{
"level": 2,
"text": "Contributors",
"anchor": "contributors",
"htmlText": "Contributors"
},
{
"level": 2,
"text": "Backers",
"anchor": "backers",
"htmlText": "Backers"
},
{
"level": 2,
"text": "Sponsors",
"anchor": "sponsors",
"htmlText": "Sponsors"
},
{
"level": 2,
"text": "Special Sponsor",
"anchor": "special-sponsor",
"htmlText": "Special Sponsor"
},
{
"level": 2,
"text": "License",
"anchor": "license",
"htmlText": "License"
}
],
"siteNavLoginPath": "/login?return_to=https%3A%2F%2Fgithub.com%2Frollup%2Frollup"
}
},
{
"displayName": "CODE_OF_CONDUCT.md",
"repoName": "rollup",
"refName": "master",
"path": "CODE_OF_CONDUCT.md",
"preferredFileType": "code_of_conduct",
"tabName": "Code of conduct",
"richText": null,
"loaded": false,
"timedOut": false,
"errorMessage": null,
"headerInfo": {
"toc": null,
"siteNavLoginPath": "/login?return_to=https%3A%2F%2Fgithub.com%2Frollup%2Frollup"
}
},
{
"displayName": "LICENSE.md",
"repoName": "rollup",
"refName": "master",
"path": "LICENSE.md",
"preferredFileType": "license",
"tabName": "License",
"richText": null,
"loaded": false,
"timedOut": false,
"errorMessage": null,
"headerInfo": {
"toc": null,
"siteNavLoginPath": "/login?return_to=https%3A%2F%2Fgithub.com%2Frollup%2Frollup"
}
},
{
"displayName": "LICENSE-CORE.md",
"repoName": "rollup",
"refName": "master",
"path": "LICENSE-CORE.md",
"preferredFileType": "license",
"tabName": "MIT",
"richText": null,
"loaded": false,
"timedOut": false,
"errorMessage": null,
"headerInfo": {
"toc": null,
"siteNavLoginPath": "/login?return_to=https%3A%2F%2Fgithub.com%2Frollup%2Frollup"
}
}
],
"overviewFilesProcessingTime": 26.067311999999998
}
},
"appPayload": {
"helpUrl": "https://docs.github.com",
"findFileWorkerPath": "/assets-cdn/worker/find-file-worker-a007d7f370d6.js",
"findInFileWorkerPath": "/assets-cdn/worker/find-in-file-worker-d0f0ff069004.js",
"githubDevUrl": null,
"enabled_features": {
"code_nav_ui_events": false,
"copilot_conversational_ux": false,
"react_blob_overlay": false,
"copilot_conversational_ux_embedding_update": false,
"copilot_popover_file_editor_header": true,
"copilot_smell_icebreaker_ux": true,
"copilot_workspace": false
}
}
}
}
{
"accept-ranges": "bytes",
"cache-control": "max-age=0, private, must-revalidate",
"content-encoding": "gzip",
"content-security-policy": "default-src 'none'; base-uri 'self'; child-src github.com/assets-cdn/worker/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com api.githubcopilot.com objects-origin.githubusercontent.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.com/assets-cdn/worker/ gist.github.com/assets-cdn/worker/",
"content-type": "text/html; charset=utf-8",
"date": "Mon, 22 Apr 2024 08:52:43 GMT",
"etag": "42152e9600fe46568802dbc1159c505d",
"referrer-policy": "no-referrer-when-downgrade",
"server": "GitHub.com",
"set-cookie": "logged_in=no; Path=/; Domain=github.com; Expires=Tue, 22 Apr 2025 08:52:43 GMT; HttpOnly; Secure; SameSite=Lax",
"strict-transport-security": "max-age=31536000; includeSubdomains; preload",
"transfer-encoding": "chunked",
"vary": "X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, Accept-Encoding, Accept, X-Requested-With",
"x-content-type-options": "nosniff",
"x-frame-options": "deny",
"x-github-request-id": "912C:2FB1F3:1A75DBC:26BD7D4:6626255A",
"x-xss-protection": "0"
}