09-22-2025 (#7)
Co-authored-by: Julien Valverdé <julien.valverde@mailo.com> Reviewed-on: #7
This commit was merged in pull request #7.
This commit is contained in:
28
packages/server/rollup.config.ts
Normal file
28
packages/server/rollup.config.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { nodeResolve } from "@rollup/plugin-node-resolve"
|
||||
import path from "node:path"
|
||||
import url from "node:url"
|
||||
import { defineConfig } from "rollup"
|
||||
import esbuild from "rollup-plugin-esbuild"
|
||||
|
||||
|
||||
const __relativeDirname = path.relative(".", url.fileURLToPath(new URL(".", import.meta.url)))
|
||||
|
||||
export default defineConfig({
|
||||
input: {
|
||||
"entrypoint.bun": path.join(__relativeDirname, "src", "entrypoint.bun.ts"),
|
||||
"entrypoint.node": path.join(__relativeDirname, "src", "entrypoint.node.ts"),
|
||||
},
|
||||
|
||||
output: {
|
||||
dir: path.join(__relativeDirname, "dist"),
|
||||
format: "es",
|
||||
sourcemap: true,
|
||||
},
|
||||
|
||||
external: id => !/^[./]/.test(id) && !/^@website\//.test(id),
|
||||
|
||||
plugins: [
|
||||
nodeResolve(),
|
||||
esbuild({ minify: true }),
|
||||
],
|
||||
})
|
||||
Reference in New Issue
Block a user