Shared tsup configuration for my projects.
Node.js 16.14.0 or newer is required.
npm install --save-dev @bricked/tsup-config
yarn add --dev @bricked/tsup-config
pnpm add --dev @bricked/tsup-config
Use the base
config in your tsup.config.ts
to compile for npm:
import { defineConfig } from "tsup";
import config from "@bricked/tsup-config";
export default defineConfig({
...config,
entry: ["src/**/*.ts"],
tsconfig: "src/tsconfig.json",
});
Use the minify
config to compile for targets without npm:
import { defineConfig } from "tsup";
import config from "@bricked/tsup-config/minify";
export default defineConfig({
...config,
entry: ["src/**/*.ts"],
tsconfig: "src/tsconfig.json",
});
Pulls to the repository will automatically be built with semantic-release. The built package can be found on npm or in the latest github release.
The package can also be built locally using the build
script.
npm run build
yarn run build
pnpm run build