26 lines
625 B
TypeScript
26 lines
625 B
TypeScript
import react18Plugin from "esbuild-plugin-react18";
|
|
import cssPlugin from "esbuild-plugin-react18-css";
|
|
import { raw } from "esbuild-raw-plugin";
|
|
import { type Options, defineConfig } from "tsup";
|
|
|
|
export default defineConfig(
|
|
(options: Options) =>
|
|
({
|
|
format: ["cjs", "esm"],
|
|
target: "es2019",
|
|
entry: ["./src/**"],
|
|
sourcemap: false,
|
|
clean: !options.watch,
|
|
bundle: true,
|
|
minify: !options.watch,
|
|
esbuildPlugins: [
|
|
raw(),
|
|
react18Plugin(),
|
|
cssPlugin(),
|
|
//rdiPlugin(),
|
|
],
|
|
external: ["react"],
|
|
...options,
|
|
}) as Options
|
|
);
|