You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
m3u8-downloader-TypeScript/esbuild.config.js

23 lines
577 B
JavaScript

const { resolve } = require("path");
require("dotenv").config({
path: resolve(__dirname, `.env.${process.env.NODE_ENV}`),
});
require("esbuild").buildSync({
entryPoints: [
resolve(__dirname, "./src/main/index.ts"),
resolve(__dirname, "./src/main/preload.ts"),
],
bundle: true,
platform: "node",
sourcemap: true,
target: ["node10.4"],
external: ["electron"],
define: {
// 开发环境中二进制可执行文件的路径
__bin__: `"${resolve(__dirname, ".bin").replace(/\\/g, "\\\\")}"`,
},
outdir: resolve(__dirname, "./dist/main"),
});