1import { defineConfig } from "tsdown";
2
3export default defineConfig([
4 {
5 cwd: ".",
6 entry: {
7 "core/index": "src/core/index.ts",
8 "astro/neon": "src/astro/neon.ts",
9 "nextjs/neon": "src/nextjs/neon.ts",
10 "nuxt/neon": "src/nuxt/neon.ts",
11 "octane/neon": "src/octane/neon.ts",
12 "react-router/neon": "src/react-router/neon.ts",
13 "solidstart/neon": "src/solidstart/neon.ts",
14 "tanstack-start/neon": "src/tanstack-start/neon.ts",
15 "sveltekit/neon": "src/sveltekit/neon.ts",
16 "vite/neon": "src/vite/neon.ts",
17 "waku/neon": "src/waku/neon.ts",
18 "vocs/neon": "src/vocs/neon.ts",
19 // Standalone child-process entries (spawned by BuildChild.ts /
20 // DevChild.ts, never imported) — must keep their own stable files at
21 // dist/core/.
22 "core/BuildChildRunner": "src/core/BuildChildRunner.ts",
23 "core/DevChildRunner": "src/core/DevChildRunner.ts",
24 "astro/index": "src/astro/index.ts",
25 "astro/aws": "src/astro/aws.ts",
26 "astro/node": "src/astro/node.ts",
27 "astro/cloudflare": "src/astro/cloudflare.ts",
28 "astro/entrypoints/aws-server": "src/astro/entrypoints/aws-server.ts",
29 "astro/entrypoints/node-server": "src/astro/entrypoints/node-server.ts",
30 "astro/source": "src/astro/source.ts",
31 "astro/runtime/entrypoints/server":
32 "src/astro/runtime/entrypoints/server.ts",
33 "astro/runtime/entrypoints/image-passthrough-endpoint":
34 "src/astro/runtime/entrypoints/image-passthrough-endpoint.ts",
35 "nextjs/index": "src/nextjs/index.ts",
36 "nextjs/aws": "src/nextjs/aws.ts",
37 "nextjs/node": "src/nextjs/node.ts",
38 "nextjs/source": "src/nextjs/source.ts",
39 "aws-lambda/index": "src/aws-lambda/index.ts",
40 "nuxt/index": "src/nuxt/index.ts",
41 "nuxt/aws": "src/nuxt/aws.ts",
42 "nuxt/node": "src/nuxt/node.ts",
43 "nuxt/cloudflare": "src/nuxt/cloudflare.ts",
44 "nuxt/source": "src/nuxt/source.ts",
45 "octane/index": "src/octane/index.ts",
46 "octane/aws": "src/octane/aws.ts",
47 "octane/aws-adapter": "src/octane/aws-adapter.ts",
48 "octane/node": "src/octane/node.ts",
49 "octane/node-adapter": "src/octane/node-adapter.ts",
50 "octane/cloudflare": "src/octane/cloudflare.ts",
51 "octane/source": "src/octane/source.ts",
52 "react-router/index": "src/react-router/index.ts",
53 "react-router/aws": "src/react-router/aws.ts",
54 "react-router/node": "src/react-router/node.ts",
55 "solidstart/index": "src/solidstart/index.ts",
56 "solidstart/aws": "src/solidstart/aws.ts",
57 "solidstart/node": "src/solidstart/node.ts",
58 "tanstack-start/index": "src/tanstack-start/index.ts",
59 "tanstack-start/aws": "src/tanstack-start/aws.ts",
60 "tanstack-start/node": "src/tanstack-start/node.ts",
61 "sveltekit/index": "src/sveltekit/index.ts",
62 "vinext/index": "src/vinext/index.ts",
63 "vinext/aws": "src/vinext/aws.ts",
64 "vinext/node": "src/vinext/node.ts",
65 "vinext/cloudflare": "src/vinext/cloudflare.ts",
66 "vinext/source": "src/vinext/source.ts",
67 "vinext/cache/index": "src/vinext/cache/index.ts",
68 "vinext/cache/kv": "src/vinext/cache/kv.ts",
69 "vinext/cache/kv-runtime": "src/vinext/cache/kv-runtime.ts",
70 "vinext/cache/redis": "src/vinext/cache/redis.ts",
71 "vinext/cache/redis-runtime": "src/vinext/cache/redis-runtime.ts",
72 "vinext/cache/s3": "src/vinext/cache/s3.ts",
73 "vinext/cache/s3-runtime": "src/vinext/cache/s3-runtime.ts",
74 "vite/index": "src/vite/index.ts",
75 "vite/aws": "src/vite/aws.ts",
76 "vite/node": "src/vite/node.ts",
77 "sveltekit/aws": "src/sveltekit/aws.ts",
78 "sveltekit/node": "src/sveltekit/node.ts",
79 "sveltekit/cloudflare": "src/sveltekit/cloudflare.ts",
80 "sveltekit/source": "src/sveltekit/source.ts",
81 "waku/index": "src/waku/index.ts",
82 "waku/adapter": "src/waku/adapter.ts",
83 "waku/aws": "src/waku/aws.ts",
84 "waku/node": "src/waku/node.ts",
85 "waku/aws-adapter": "src/waku/aws-adapter.ts",
86 "waku/cloudflare": "src/waku/cloudflare.ts",
87 "waku/source": "src/waku/source.ts",
88 "vocs/index": "src/vocs/index.ts",
89 "vocs/cloudflare": "src/vocs/cloudflare.ts",
90 "vocs/node": "src/vocs/node.ts",
91 "vocs/source": "src/vocs/source.ts",
92 },
93 exports: false,
94 outDir: "dist",
95 tsconfig: "tsconfig.node.json",
96 format: "esm",
97 target: "esnext",
98 dts: false,
99 shims: false,
100 sourcemap: true,
101 deps: {
102 alwaysBundle: [
103 /^@astrojs\/internal-helpers(?:\/|$)/,
104 /^@astrojs\/underscore-redirects(?:\/|$)/,
105 ],
106 // Fail the build if another dependency is bundled accidentally.
107 onlyBundle: [
108 "@astrojs/internal-helpers",
109 "@astrojs/underscore-redirects",
110 ],
111 },
112 inputOptions: {
113 external: [
114 /^(?:astro|cloudflare|virtual):/,
115 /^nitropack(?:\/|$)/,
116 /^alchemy(?:\/|$)/,
117 /^@distilled\.cloud\/aws(?:\/|$)/,
118 ],
119 makeAbsoluteExternalsRelative: true,
120 },
121 outputOptions: {
122 entryFileNames: "[name].js",
123 chunkFileNames: "_chunks/[name]-[hash].js",
124 },
125 },
126 {
127 cwd: ".",
128 entry: { "nuxt/dev/plugin": "src/nuxt/dev/plugin.ts" },
129 exports: false,
130 outDir: "dist",
131 clean: false,
132 tsconfig: "tsconfig.node.json",
133 format: "esm",
134 target: "esnext",
135 dts: false,
136 shims: false,
137 sourcemap: true,
138 deps: { onlyBundle: false },
139 inputOptions: {
140 external: [/^nitropack(?:\/|$)/],
141 makeAbsoluteExternalsRelative: true,
142 },
143 outputOptions: {
144 entryFileNames: "[name].js",
145 codeSplitting: false,
146 },
147 },
148]);