server be & fe

This commit is contained in:
azykov@mail.ru
2026-09-29 13:50:01 +03:00
commit 657009bd6c
56 changed files with 6162 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
import { build } from 'esbuild';
import path from 'node:path';
// Bundle workspace packages (they ship TypeScript sources), keep npm dependencies external.
const externalNpmPackages = {
name: 'external-npm-packages',
setup(b) {
b.onResolve({ filter: /.*/ }, (args) => {
if (args.kind === 'entry-point' || args.path.startsWith('.') || path.isAbsolute(args.path)) return undefined;
if (args.path.startsWith('@cardy/')) return undefined;
return { path: args.path, external: true };
});
},
};
await build({
entryPoints: ['src/index.ts'],
outfile: 'dist/index.js',
bundle: true,
platform: 'node',
format: 'esm',
target: 'node22',
sourcemap: true,
plugins: [externalNpmPackages],
});