-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: bundle @fireproof/ipfs using tsup instead of manual scripting
- Loading branch information
1 parent
9cbbf77
commit 0817c94
Showing
4 changed files
with
419 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { defineConfig } from 'tsup'; | ||
|
||
/* | ||
By default tsup bundles all import-ed modules but, dependencies and peerDependencies in your package.json are always excluded. | ||
You can also use --external <module|pkgJson> flag to mark other packages or other special package.json's dependencies and peerDependencies as external. | ||
If you are using tsup to build for Node.js applications/APIs, usually bundling dependencies is not needed, | ||
and it can even break things, for instance, while outputting to ESM. | ||
*/ | ||
export default defineConfig({ | ||
name: "@fireproof/ipfs", | ||
// Entry file for your library | ||
entryPoints: ['src/index.ts'], | ||
|
||
// Output directory for the bundled files | ||
outDir: 'dist', | ||
|
||
// Format options for ESM and UMD bundles | ||
format: ['esm', 'cjs', 'iife'], | ||
|
||
// Enable TypeScript type generation | ||
dts: true, | ||
clean: true, | ||
sourcemap: true, | ||
minify: true, | ||
|
||
/** Always bundle modules matching given patterns */ | ||
noExternal: [], | ||
/** Don't bundle these modules */ | ||
external: [], | ||
}); |
Oops, something went wrong.