{"id":23666580,"url":"https://github.com/redsift/rollup-bundler","last_synced_at":"2025-12-11T05:30:15.425Z","repository":{"id":29089667,"uuid":"120138985","full_name":"redsift/rollup-bundler","owner":"redsift","description":"Rollup wrapper to create ESM and UMD bundles with zero config support.","archived":false,"fork":false,"pushed_at":"2024-04-11T10:26:36.000Z","size":1746,"stargazers_count":0,"open_issues_count":16,"forks_count":1,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-01-30T00:19:19.421Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redsift.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-03T23:29:00.000Z","updated_at":"2023-08-14T18:22:39.000Z","dependencies_parsed_at":"2024-06-21T03:55:48.766Z","dependency_job_id":"b3b6f976-3798-493f-9bda-7cbb124f708b","html_url":"https://github.com/redsift/rollup-bundler","commit_stats":{"total_commits":49,"total_committers":4,"mean_commits":12.25,"dds":0.4897959183673469,"last_synced_commit":"98cb1ed7f2d4513f023b070a7896f330022d4a59"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redsift%2Frollup-bundler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redsift%2Frollup-bundler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redsift%2Frollup-bundler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redsift%2Frollup-bundler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redsift","download_url":"https://codeload.github.com/redsift/rollup-bundler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239674877,"owners_count":19678487,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-29T07:33:10.559Z","updated_at":"2025-12-11T05:30:15.367Z","avatar_url":"https://github.com/redsift.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rollup-bundler\n\n## Installation\n\n```bash\nyarn add --dev @redsift/rollup-bundler @babel/runtime\n```\n\n## Usage\n\n### CLI\n\nFrom the command line use either\n\n`npx rollup-bundler` for zero config usage or\n\n`npx rollup-bundler my-config-file.js` to apply a custom configuration.\n\n### `package.json`\n\nYou can add the bundler to your `package.json` file with a script like this (name is arbitrary):\n\n```\n\"scripts\": {\n  ...\n  \"build\": \"rollup-bundler\"\n}\n```\n\nor with a custom configuration:\n\n```\n\"scripts\": {\n  ...\n  \"build\": \"rollup-bundler my-config-file.js\"\n}\n```\n\n## Zero Config Usage\n\nThis module has a 'zero config' setup which takes takes a ES5/ES2015+\n\n`./src/index.js`\n\nas input and outputs\n\n```\n./dist\n├── dist/my-module.esm.js      \u003c--- ESM module file with ES5 syntax\n├── dist/my-module.esm.minjs   \u003c--- minified version of the above (for the `module` field in `package.json`)\n├── dist/my-module.umd.js      \u003c--- UMD module file with ES5 syntax\n├── dist/my-module.umd.min.js  \u003c--- minified version of the above (for the `main` field in `package.json`)\n```\n\nThe `my-module` name is derived from the `package.json` `name` field.\n\nYou don't need a `.babelrc` file, but `babel-preset-env` and `babel-plugin-external-helpers` need to be installed as (dev) dependencies.\n\n## Custom Usage\n\nTo use a different input file and/or output to a different folder create a configuration file, e.g. `bundle.config.js`:\n\n```js\nmodule.exports = {\n  input: `./index.js`,\n  output: {\n    file: \"anotherdist/my-different-module-name.js\",\n    name: \"MyDifferentModuleName\"\n  },\n  pluginConfigs: {\n    commonjs: {\n      namedExports: {\n        \"node_modules/a-common-js-module-with-unsupported-export/index.min.js\": [\n          \"MyCustomNamedExport\"\n        ]\n      }\n    }\n  }\n};\n```\nThe config format follows rollup's configuration for `input` and `output` fields but adds a `pluginConfig` field to specify custom options for rollup plugins used by the bundler. Each named plugin key (e.g. `commonjs`) is used verbatim as options object for the respective rollup plugin. This is the list of configurable plugins:\n\n* json\n* babel\n* resolve\n* commonjs\n\nThe above custom configuration will produce the following output:\n\n```\n./dist\n├── anotherdist/my-different-module-name.esm.js      \u003c--- ESM module file with ES5 syntax\n├── anotherdist/my-different-module-name.esm.minjs   \u003c--- minified version of the above (for the `module` field in `package.json`)\n├── anotherdist/my-different-module-name.umd.js      \u003c--- UMD module file with ES5 syntax\n├── anotherdist/my-different-module-name.umd.min.js  \u003c--- minified version of the above (for the `main` field in `package.json`)\n```\n\n## Use your own `.babelrc`\n\nIf the root folder of your project contains a `.babelrc` the bundler will use it. The bundler will also add the [`external-helpers`](https://github.com/rollup/rollup-plugin-babel#configuring-babel) plugin automatically to optimize the bundle.\n\nIf you are experiencing erros related to the `node_modules/babel-runtime` package and are using using the `transform-runtime` plugin please make sure to disable the `helpers` option like this in your `.babelrc`:\n\n```\n{\n  \"presets\": ...,\n  \"plugins\": [\n    [\"@babel/transform-runtime\", { \"helpers\": false }]\n  ]\n}\n```\n\nThe optimization of the helpers will be done by the `external-helpers` plugin.\n\n## Bundle visualization\n\nThe bundler creates a visual overview of the output bundle to see which packages contribute to the filesize. The output is created as `stats.html`.\n\n\u003e This project is based on [rollup-config-builder](https://github.com/Donov4n/rollup-config-builder).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredsift%2Frollup-bundler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredsift%2Frollup-bundler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredsift%2Frollup-bundler/lists"}