Files
Unify/framework/npmScripts/esbuild/esbuild.hybrid.js
2025-12-25 11:16:59 +01:00

36 lines
958 B
JavaScript

/*
Copyright (c) 2020, 2023, The Unified Company.
This code is part of Unify.
This program is free software; you can redistribute it and/or modify
it under the terms of the ESA Software Community License - Strong Copyleft,
https://unifyjs.org
*/
import esbuild from "../../node_modules/esbuild/node_modules/esbuild/lib/main.js";
import fse from "fs-extra";
esbuild.build({
bundle: true,
entryPoints: ["./framework/server/index.js"],
outfile: "./platforms/hybrid/framework/server/index.js",
platform: "node",
target: "node12",
keepNames: true,
external: [ ]
});
fse.copySync("./framework/configs", "./platforms/hybrid/framework/configs");
fse.copySync("./assets/bundle.js", "./platforms/hybrid/assets/bundle.js");
fse.copySync("framework/node_modules/better-sqlite3/node_modules/better-sqlite3/build/Release/", "./platforms/hybrid/build/");
fse.copySync("./assets/production", "./platforms/hybrid/assets/production");