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:
8
packages/server/biome.json
Normal file
8
packages/server/biome.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"$schema": "https://biomejs.dev/schemas/latest/schema.json",
|
||||
"root": false,
|
||||
"extends": "//",
|
||||
"files": {
|
||||
"includes": ["./src/**"]
|
||||
}
|
||||
}
|
||||
@@ -5,12 +5,12 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"lint:tsc": "tsc --noEmit",
|
||||
"bun:dev": "NODE_ENV=development bun --hot ./src/entrypoint.bun.ts",
|
||||
"bun:build": "esbuild ./src/entrypoint.bun.ts --outdir=./dist --bundle --minify --format=esm --sourcemap --platform=node",
|
||||
"bun:start": "NODE_ENV=production bun ./dist/entrypoint.bun.js",
|
||||
"node:dev": "NODE_ENV=development tsx --watch ./src/entrypoint.node.ts",
|
||||
"node:build": "esbuild ./src/entrypoint.node.ts --outdir=./dist --bundle --minify --format=esm --sourcemap --platform=node",
|
||||
"node:start": "NODE_ENV=production node --enable-source-maps ./dist/entrypoint.node.js",
|
||||
"lint:biome": "biome lint",
|
||||
"build": "rollup -c",
|
||||
"dev:bun": "NODE_ENV=development bun --hot ./src/entrypoint.bun.ts",
|
||||
"dev:node": "NODE_ENV=development tsx --watch ./src/entrypoint.node.ts",
|
||||
"start:bun": "NODE_ENV=production bun ./dist/entrypoint.bun.js",
|
||||
"start:node": "NODE_ENV=production node --enable-source-maps ./dist/entrypoint.node.js",
|
||||
"clean:dist": "rm -rf dist",
|
||||
"clean:modules": "rm -rf node_modules"
|
||||
},
|
||||
@@ -29,7 +29,10 @@
|
||||
"effect": "^3.17.13"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-node-resolve": "^16.0.1",
|
||||
"esbuild": "^0.25.9",
|
||||
"rollup": "^4.52.0",
|
||||
"rollup-plugin-esbuild": "^6.2.1",
|
||||
"tsx": "^4.20.5"
|
||||
}
|
||||
}
|
||||
|
||||
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