{"id":13431900,"url":"https://github.com/nolanlawson/rollupify","last_synced_at":"2025-09-27T13:32:00.170Z","repository":{"id":57122255,"uuid":"53101571","full_name":"nolanlawson/rollupify","owner":"nolanlawson","description":"Browserify transform to apply Rollup (UNMAINTAINED)","archived":false,"fork":false,"pushed_at":"2018-10-28T22:23:30.000Z","size":34,"stargazers_count":386,"open_issues_count":3,"forks_count":16,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-14T00:44:01.542Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nolanlawson.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}},"created_at":"2016-03-04T02:38:32.000Z","updated_at":"2024-01-09T10:26:09.000Z","dependencies_parsed_at":"2022-08-26T04:12:24.437Z","dependency_job_id":null,"html_url":"https://github.com/nolanlawson/rollupify","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nolanlawson%2Frollupify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nolanlawson%2Frollupify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nolanlawson%2Frollupify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nolanlawson%2Frollupify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nolanlawson","download_url":"https://codeload.github.com/nolanlawson/rollupify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234290542,"owners_count":18809236,"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-07-31T02:01:06.874Z","updated_at":"2025-09-27T13:31:54.924Z","avatar_url":"https://github.com/nolanlawson.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"rollupify [![Build Status](https://travis-ci.org/nolanlawson/rollupify.svg?branch=master)](https://travis-ci.org/nolanlawson/rollupify) [![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/)\n====\n\nBrowserify transform to apply [Rollup](http://rollupjs.org/), converting ES6/ES2015 modules\ninto one big CommonJS module.\n\nThis tends to result in smaller bundle sizes, due to Rollup's [tree-shaking](http://www.2ality.com/2015/12/webpack-tree-shaking.html) and\n[scope-hoisting](https://github.com/substack/node-browserify/issues/1379#issuecomment-183383199) capabilities.\n\n⚠️ _**Maintenance notice:** This repo is unmaintained. I consider it largely a hack for migrating existing Browserify/CommonJS projects to Rollup/ESM. Probably you should just use Rollup instead, with plugins like `rollup-plugin-commonjs` and `rollup-plugin-node-resolve`, or manually run `rollup` before `browserify`._\n\nUsage\n---\n\n    npm install rollupify\n\nThen:\n\n    browserify -t rollupify index.js \u003e output.js\n\nOr in your `package.json`:\n\n```js\n\"browserify\": {\n  \"transform\": [\"rollupify\"]\n}\n```\n\nExample\n---\n\n**Input:**\n\n```js\n// index.js\nimport hello from './hello';\nconsole.log(hello);\nexport default hello;\n```\n\n```js\n// hello.js\nexport default \"hello world\";\n```\n\n**Output:**\n\n```js\n(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"\u0026\u0026require;if(!u\u0026\u0026a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"\u0026\u0026require;for(var o=0;o\u003cr.length;o++)s(r[o]);return s})({1:[function(require,module,exports){\n'use strict';\n\nvar hello = \"hello world\";\n\nconsole.log(hello);\n\nmodule.exports = hello;\n},{}]},{},[1]);\n```\n\nUsing alongside other transforms\n----\n\nIf you are using other transforms like `babelify`, make sure you apply\nthe transforms in the right order. `rollupify` should apply before `babelify`:\n\n    browserify -t rollupify -t babelify index.js \u003e output.js\n\nOr when configuring:\n\n```js\n\"browserify\": {\n  \"transform\": [\"rollupify\", \"babelify\"]\n}\n```\n\nDetails\n----\n\n`rollupify` only works on ES6/ES2015 modules. Any `require()` statements will\nbe left untouched, and passed on to Browserify like normal.\n\nSourcemaps are supported, assuming you pass `--debug` or `{debug: true}`\ninto Browserify.\n\nNeed more evidence that Rollup and ES6 modules are awesome? See [rollup-comparison](https://github.com/nolanlawson/rollup-comparison)\nand [A better build system with Rollup](http://pouchdb.com/2016/01/13/pouchdb-5.2.0-a-better-build-system-with-rollup.html).\n\nNeed to get started converting your CommonJS codebase into ES6? Try [cjs-to-es6](https://github.com/nolanlawson/cjs-to-es6).\n\nCustomising rollup\n----\n\nGiven a `rollup.config.js` like:\n\n```js\nmodule.exports = {\n  plugins: [\n    require('rollup-plugin-babel')({\n      exclude: 'node_modules/**'\n    })\n  ]\n}\n```\n\nUse it through the command line:\n\n    browserify -t [ rollupify --config rollup.config.js ] index.js \u003e output.js\n\nOr in your `package.json`:\n\n```js\n\"browserify\": {\n  \"transform\": [\"rollupify\", {\"config\": \"rollup.config.js\"}]\n}\n```\n\nIf you are using Browserify in JavaScript, you can also pass in the `config` object directly:\n\n```js\nvar b = browserify('./')\n  .transform('rollupify', {\n    config: { /* your rollup config goes here */ }\n  }).bundle();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnolanlawson%2Frollupify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnolanlawson%2Frollupify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnolanlawson%2Frollupify/lists"}