Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 

17 Zeilen
394 B

  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. })();