纸飞机的信笺
博客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

babelBabel

antd@4Create React App其它库MUI

这里列举几个常用插件的 Babel 配置。

使用 emotion#

依赖项:

npm add -D @emotion/babel-plugin

配置如下:

{
  "plugins": [["@emotion"]]
}

使用 lodash 开启按需引入#

依赖项:

npm add -D babel-plugin-lodash

配置如下:

{
  "plugins": [["lodash"]]
}

如果你不想安装这个插件,也可以直接使用 babel-plugin-import 来进行配置:

{
  "plugins": [
    [
      "import",
      {
        "libraryName": "lodash",
        "libraryDirectory": "",
        "camel2DashComponentName": false
      }
    ]
  ]
}

移除 console.log() 日志打印#

Babel 也可以对源码进行预处理,这里例如通过插件移除所有的日志打印。

依赖项:

npm add -D babel-plugin-transform-remove-console

配置如下:

{
  "plugins": [["transform-remove-console"]]
}