mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
25 lines
628 B
TypeScript
25 lines
628 B
TypeScript
import { build } from "esbuild";
|
|
import path from "node:path";
|
|
|
|
build({
|
|
entryPoints: ["./src/**/*.ts", "./src/**/*.tsx"], // Punto de entrada principal de tu aplicación
|
|
outdir: "dist",
|
|
platform: "node",
|
|
format: "esm",
|
|
sourcemap: false,
|
|
tsconfig: "./tsconfig.server.json",
|
|
plugins: [
|
|
// TsconfigPathsPlugin({ tsconfig: "./tsconfig.server.json" }),
|
|
{
|
|
name: "AddJsExtensions",
|
|
setup(build) {
|
|
build.onResolve({ filter: /.*/ }, (args) => {
|
|
if (args.path.startsWith(".") && !path.extname(args.path)) {
|
|
return { path: `${args.path}.js` };
|
|
}
|
|
});
|
|
},
|
|
},
|
|
],
|
|
}).catch(() => process.exit(1));
|