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

webpackWebpack

常用静态资源 CDNSassLessantd@4

antd v4 内部使用 moment,它的体积太大,不利于网站优化,我们可以通过插件进行优化。

注意,这段配置仅适用于 antd v4 版本,如果你使用后续的 v5,则不需要。

依赖项:

npm add -D antd-dayjs-webpack-plugin

配置如下:

const AntdDayjsWebpackPlugin = require('antd-dayjs-webpack-plugin')
 
module.exports = {
  plugins: [new AntdDayjsWebpackPlugin()],
}

如果不想换 dayjs,也可以安装 moment-locales-webpack-plugin 插件,它可以删去 moment 中我们不需要的国际化语言配置。

配置如下:

const MomentLocalesPlugin = require('moment-locales-webpack-plugin')
 
module.exports = {
  plugins: [
    new MomentLocalesPlugin({
      // 这里只额外保留中文
      localesToKeep: ['zh-cn'],
    }),
  ],
}