File size: 654 Bytes
3162254 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | import path from "path";
import esbuild from "rollup-plugin-esbuild";
import resolve from "@rollup/plugin-node-resolve";
process.env.NODE_ENV === "production";
/**
* @return {import("./node_modules/rollup").RollupOptions}
*/
export default async () => {
return {
input: "./server/index.ts",
output: {
file: "./build/server.js",
format: "cjs",
},
external: ["socket.io", "http", "os", "express", "process", "path"],
plugins: [
resolve(),
esbuild({
target: "esnext",
minify: true,
charset: "utf8",
tsconfig: path.resolve(__dirname, "tsconfig.json"),
}),
],
};
};
|