您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

2 年前
12345678910111213141516
  1. const { build } = require("esbuild"),
  2. { copyFile } = require("fs");
  3. const production = process.env.NODE_ENV === "production",
  4. formats = ["cjs", "esm"];
  5. (async () => {
  6. for (const format of formats) {
  7. await build({
  8. entryPoints: ["./src/index.ts"],
  9. watch: !production,
  10. format,
  11. outfile: `./dist/index${format === "cjs" ? "" : "." + format}.js`
  12. });
  13. }
  14. })();