纸飞机的信笺
博客Awesome开源Demos制品库样板与配置

系统

command常用命令行
vscodeVSCode

通用

licenseLICENSE 许可
editorconfigEditorConfig
gitGit
typescriptTypeScript

Agent

claudeClaude Code
codexCodex

开发配置

nextjsNext.js
viteVite
vitestVitest
postcssPostCSS
rollupRollup
eslintESLint
prettierPrettier
tailwindcssTailwindCSS

包管理

npmnpm
nodejspackage.json

代码质量

huskyHusky
commitizenCommitizen
commitlintCommitLint
lintstagedLintStaged

传统

webpackWebpack
babelBabel
craCreateReactApp

杂项

monorepoMonorepo

rollupRollup

TypeScript 包外部依赖Node.js 包

此 rollup.config.js 配置文件适用于存在外部依赖项的场景。

例如:你正在为 Vue 开发组件库,而且需要导出 UMD 格式;UDM 格式没有模块化系统,代码中只能通过全局变量来访问 Vue 实例,所以代码必须把 Vue 配置为 “通过全局变量访问的外部依赖”。

配置如下:

module.exports = [
  {
    // 添加下面这两行
    external: ['vue'],
    globals: { vue: 'Vue' },
 
    // 其它配置项 ...
  },
]