名称: esbuild 描述: esbuild 打包、插件和构建优化。 允许的工具: 读取、写入、编辑、Bash、Glob、Grep
esbuild 技能
提供快速打包的专家级协助。
能力
- 配置 esbuild
- 创建插件
- 优化构建
- 处理 TypeScript
- 为 Node.js/浏览器打包
用法
import * as esbuild from 'esbuild';
await esbuild.build({
entryPoints: ['src/index.ts'],
bundle: true,
minify: true,
sourcemap: true,
target: ['es2020'],
outfile: 'dist/bundle.js',
plugins: [myPlugin],
});
目标流程
- 构建优化
- 命令行工具
- 快速打包