add subDirectory option, move @ to # in relative paths, fix builder
All checks were successful
Code quality checks / biome (push) Successful in 12s
All checks were successful
Code quality checks / biome (push) Successful in 12s
This commit is contained in:
parent
e0f4c50f20
commit
7b02602e86
9 changed files with 73 additions and 47 deletions
29
tsup.config.ts
Normal file
29
tsup.config.ts
Normal file
|
@ -0,0 +1,29 @@
|
|||
import { defineConfig } from "tsup";
|
||||
|
||||
export default defineConfig({
|
||||
entry: ["src/index.ts"],
|
||||
format: ["esm", "cjs"],
|
||||
dts: {
|
||||
resolve: true,
|
||||
compilerOptions: {
|
||||
module: "ESNext",
|
||||
moduleResolution: "bundler",
|
||||
},
|
||||
},
|
||||
outDir: "dist",
|
||||
minify: true,
|
||||
splitting: false,
|
||||
sourcemap: false,
|
||||
clean: true,
|
||||
treeshake: true,
|
||||
target: "es2024",
|
||||
define: {
|
||||
"process.env.NODE_ENV": '"production"',
|
||||
},
|
||||
outExtension({ format }) {
|
||||
return {
|
||||
js: format === "cjs" ? ".cjs" : ".js",
|
||||
dts: ".d.ts",
|
||||
};
|
||||
},
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue