{"id":16585297,"url":"https://github.com/chenshenhai/rollupjs-note","last_synced_at":"2026-01-27T02:02:41.708Z","repository":{"id":60473802,"uuid":"138407755","full_name":"chenshenhai/rollupjs-note","owner":"chenshenhai","description":"《Rollup.js 实战学习笔记》已完结 😆","archived":false,"fork":false,"pushed_at":"2020-10-08T03:07:06.000Z","size":1127,"stargazers_count":241,"open_issues_count":1,"forks_count":53,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-06T06:26:22.552Z","etag":null,"topics":["rollup","rollup-example","rollup-study","rollupjs"],"latest_commit_sha":null,"homepage":"https://chenshenhai.github.io/rollupjs-note","language":null,"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/chenshenhai.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":"2018-06-23T14:30:15.000Z","updated_at":"2025-03-03T13:14:07.000Z","dependencies_parsed_at":"2022-09-30T03:50:26.844Z","dependency_job_id":null,"html_url":"https://github.com/chenshenhai/rollupjs-note","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chenshenhai/rollupjs-note","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenshenhai%2Frollupjs-note","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenshenhai%2Frollupjs-note/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenshenhai%2Frollupjs-note/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenshenhai%2Frollupjs-note/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chenshenhai","download_url":"https://codeload.github.com/chenshenhai/rollupjs-note/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenshenhai%2Frollupjs-note/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28796962,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T01:07:07.743Z","status":"online","status_checked_at":"2026-01-27T02:00:07.755Z","response_time":168,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["rollup","rollup-example","rollup-study","rollupjs"],"created_at":"2024-10-11T22:47:29.465Z","updated_at":"2026-01-27T02:02:41.681Z","avatar_url":"https://github.com/chenshenhai.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rollup.js 实战学习笔记\n\n## 前言\n\n### 2020年5月\n\n今年的五一假期有 5天小长假，回顾以前的笔记，发现 `Rollup` 已经更新到 `2.x` ，而且官方提供了很多丰富的插件`plugins` [github.com/rollup/plugins/](https://github.com/rollup/plugins/)。趁着假期还有点空闲时间，把本笔记的使用方式更新到最新版(截至2020年5月)的使用方式。\n\n### 2018年8月\n\n最近几个月自己开发一些`js`库或组件库，费了九牛二虎之力搭建了`webpack`脚手架，然后还要配置一堆`loader`，最后编译出来的代码还夹带了一堆`webpackJsonp([0], .....)` 的代码，使得编译后的ES5代码（未混淆）可读性降低了，也导致了结果代码体积增大。\n\n在寻找新的编译工具时候，发现`Vue.js`，`React.js`等流行库的源码都用了`rollup.js`来编译代码，同时相关库的编译也输出了各种模块规范`AMD`、`CommonJS`、`UMD`和`IIFE`。因此选择了`rollup.js`来实践开发日常的工具，在玩了几个月的的`rollup.js`后，将学习的过程中记录成这本书，也沉淀了学习过程中的demo，方便以后搭建脚手架时候查看。\n\n\n## 关于本书\n\n\u003cimg width=\"360\" src=\"https://user-images.githubusercontent.com/8216630/47964308-ec4a8380-e072-11e8-8441-e5ac10acc81e.png\"\u003e\n\n\n- [关于作者(我)](https://chenshenhai.github.io/)\n- [作者(我)Github](https://github.com/chenshenhai/)\n- [gitbook在线阅读入口](https://chenshenhai.github.io/rollupjs-note/)\n- 本书便捷阅读入口 [chenshenhai.com/rollupjs-note](https://chenshenhai.com/rollupjs-note)\n- 如有错误或疑问欢迎，提交[issues](https://github.com/chenshenhai/rollupjs-note/issues)或PR\n\n\n## 目录\n\n* [Rollup.js 实战学习笔记](https://github.com/chenshenhai/rollupjs-note/blob/master/README.md)\n* [0.致读者]\n    * [0.1 本书初衷](https://github.com/chenshenhai/rollupjs-note/tree/master/note/chapter00/01.md) \n    * [0.2 参考资料](https://github.com/chenshenhai/rollupjs-note/tree/master/note/chapter00/02.md)\n* [1. 快速开始]\n    * [1.1 快速配置文件](https://github.com/chenshenhai/rollupjs-note/tree/master/note/chapter01/01.md)\n    * [1.2 ES6+编译](https://github.com/chenshenhai/rollupjs-note/tree/master/note/chapter01/02.md)\n    * [1.3 开发模式](https://github.com/chenshenhai/rollupjs-note/tree/master/note/chapter01/03.md)\n    * [1.4 生产模式](https://github.com/chenshenhai/rollupjs-note/tree/master/note/chapter01/04.md)\n    * [1.5 Node.js使用API模式](https://github.com/chenshenhai/rollupjs-note/tree/master/note/chapter01/05.md)\n* [2. js编译]\n    * [2.1 多文件输入输出编译](https://github.com/chenshenhai/rollupjs-note/tree/master/note/chapter02/01.md)\n    * [2.2.1 AMD 模块类型编译 (上)](https://github.com/chenshenhai/rollupjs-note/tree/master/note/chapter02/02-01.md)\n    * [2.2.2 AMD 模块类型编译 (下)](https://github.com/chenshenhai/rollupjs-note/tree/master/note/chapter02/02-02.md)\n    * [2.2.3 CommonJS 模块类型编译](https://github.com/chenshenhai/rollupjs-note/tree/master/note/chapter02/02-03.md)\n    * [2.2.4 IIFE 模块类型编译](https://github.com/chenshenhai/rollupjs-note/tree/master/note/chapter02/02-04.md)\n    * [2.2.5 UMD 模块类型编译](https://github.com/chenshenhai/rollupjs-note/tree/master/note/chapter02/02-05.md)\n    * [2.3 Node.js使用API模式的热编译](https://github.com/chenshenhai/rollupjs-note/tree/master/note/chapter02/03.md)\n    * [2.4 node模块引用](https://github.com/chenshenhai/rollupjs-note/tree/master/note/chapter02/04.md)\n    * [2.5 json文件引用](https://github.com/chenshenhai/rollupjs-note/tree/master/note/chapter02/05.md)\n* [3. css编译]\n    * [3.1 css引用](https://github.com/chenshenhai/rollupjs-note/tree/master/note/chapter03/01.md)\n    * [3.2 scss编译](https://github.com/chenshenhai/rollupjs-note/tree/master/note/chapter03/02.md)\n    * [3.3 less编译](https://github.com/chenshenhai/rollupjs-note/tree/master/note/chapter03/03.md)\n* [4. 框架使用]\n    * [4.1 React.js编译](https://github.com/chenshenhai/rollupjs-note/tree/master/note/chapter04/01.md)\n    * [4.2 Vue.js编译](https://github.com/chenshenhai/rollupjs-note/tree/master/note/chapter04/02.md)\n* [5. 插件开发]\n    * [5.1 开发插件helloworld](https://github.com/chenshenhai/rollupjs-note/tree/master/note/chapter05/01.md)\n* [6. 其他实战]\n    * [6.1 TypeScript编译](https://github.com/chenshenhai/rollupjs-note/tree/master/note/chapter06/01.md)\n    * [6.2 Babel7 编译](https://github.com/chenshenhai/rollupjs-note/tree/master/note/chapter06/02.md)\n\n\n## 更多学习笔记\n\n更多前端`技术学习`和`开源学习教程`可关注公众号 `DeepSeaCode`  (`大海码` ) \n\n![qrcode_for_gh_959d1c4d729a_258](https://user-images.githubusercontent.com/8216630/43264303-495bf52c-9118-11e8-85cd-4ec6fcc6d066.jpg)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchenshenhai%2Frollupjs-note","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchenshenhai%2Frollupjs-note","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchenshenhai%2Frollupjs-note/lists"}