-
-
Notifications
You must be signed in to change notification settings - Fork 119
Open
Labels
Description
Reproduction link or steps
Hello, It is really compicated to me to set this project, this is a private project inside a big monorepo.
So, I use express v5 and I try to launch builded code. When I use tsdown without minify, all is good. When I run with minify code, all express routes return 404 with no reason (I have no exception in my code).
I think minify part rewrite all express regexp part to retrieve routes.
What is expected?
All express routes return 404 when code is minify
What is actually happening?
All works fine with or without minify enabled
Any additional comments?
This is my tsdown config :
import { defineConfig } from 'tsdown';
export default defineConfig({
entry: ['index.ts'],
external: ['pg', 'pg-query-stream', 'better-sqlite3', 'tedious', 'mysql', 'oracledb', 'sqlite3'],
format: 'esm',
minify: true,
nodeProtocol: true,
noExternal: [/^(?!(pg|better-sqlite3|tedious|mysql|oracledb|sqlite3)).*$/],
platform: 'node',
shims: true,
sourcemap: true,
treeshake: true,
tsconfig: 'tsconfig.json',
watch: false,
});