Files
upstream-mirror 3a013ccdfe
Some checks failed
autofix.ci / autofix (push) Failing after 4s
Release / Release (push) Has been skipped
GitHub Actions Security Analysis / Run zizmor (push) Failing after 2s
snapshot of https://github.com/TanStack/query.git (main, 2026-09-16; blobs > 131072B omitted)
2026-09-16 01:13:08 +05:00

43 lines
849 B
TypeScript

import { defineConfig } from 'tsdown'
import solid from 'unplugin-solid/rolldown'
const baseConfig = {
target: 'esnext',
platform: 'browser' as const,
format: ['esm', 'cjs'] as ['esm', 'cjs'],
outDir: 'build',
fixedExtension: false,
}
const environment = (development: boolean) => ({
NODE_ENV: development ? 'development' : 'production',
PROD: !development,
DEV: development,
SSR: false,
})
export default defineConfig([
{
...baseConfig,
entry: { index: 'src/index.ts' },
clean: true,
dts: true,
env: environment(false),
minify: {
compress: {
dropConsole: true,
dropDebugger: true,
},
},
plugins: [solid()],
},
{
...baseConfig,
entry: { dev: 'src/index.ts' },
clean: false,
dts: false,
env: environment(true),
plugins: [solid()],
},
])