mirror of
https://github.com/MercuryWorkshop/adrift.git
synced 2025-05-12 05:50:00 -04:00
22 lines
No EOL
578 B
JavaScript
22 lines
No EOL
578 B
JavaScript
const { dtsPlugin } = require("esbuild-plugin-d.ts");
|
|
const { build } = require("esbuild");
|
|
|
|
|
|
for (let project of ["client", "protocol"]) {
|
|
build({
|
|
bundle: true,
|
|
format: "esm",
|
|
entryPoints: [`./${project}/src/index.ts`],
|
|
outfile: `./dist/${project}.mjs`,
|
|
})
|
|
build({
|
|
bundle: true,
|
|
format: "cjs",
|
|
entryPoints: [`./${project}/src/index.ts`],
|
|
outfile: `./dist/${project}.cjs`,
|
|
plugins: [dtsPlugin({
|
|
outDir: `./dist/${project}`,
|
|
tsconfig: "tsconfig.json"
|
|
})]
|
|
})
|
|
} |