chore: bundle necessary dependencies via tsup
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Iaf818970d17c911b80d3b5bc634a75896a6a6964
This commit is contained in:
parent
1fe6bfb380
commit
1bf4bc335c
2 changed files with 18 additions and 1 deletions
|
|
@ -9,7 +9,7 @@
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "troutbot";
|
pname = "troutbot";
|
||||||
version = "0-unstable-2026-01-30";
|
version = "0-unstable-2026-02-01";
|
||||||
|
|
||||||
src = lib.fileset.toSource {
|
src = lib.fileset.toSource {
|
||||||
root = ../.;
|
root = ../.;
|
||||||
|
|
@ -19,6 +19,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
../package.json
|
../package.json
|
||||||
../pnpm-lock.yaml
|
../pnpm-lock.yaml
|
||||||
../tsconfig.json
|
../tsconfig.json
|
||||||
|
../tsup.config.ts
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
16
tsup.config.ts
Normal file
16
tsup.config.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
import { defineConfig } from 'tsup';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
entry: ['src/index.ts'],
|
||||||
|
format: 'cjs',
|
||||||
|
dts: true,
|
||||||
|
clean: true,
|
||||||
|
|
||||||
|
// Bundle all dependencies into the output so it works without node_modules
|
||||||
|
// Required for Nix packaging where node_modules are not available at runtime
|
||||||
|
noExternal: ['jiti', 'dotenv', 'express', 'express-rate-limit', '@octokit/rest', 'winston'],
|
||||||
|
|
||||||
|
// Ensure all dependencies are resolved
|
||||||
|
platform: 'node',
|
||||||
|
target: 'node22',
|
||||||
|
});
|
||||||
Loading…
Add table
Add a link
Reference in a new issue