Skip to content

Commit

Permalink
Might have fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
zakstucke committed Nov 29, 2023
1 parent c0c4b31 commit 9ea8828
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
5 changes: 2 additions & 3 deletions js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
"author": "[email protected]",
"license": "MIT",
"type": "module",
"main": "dist/bitbazaar/index.cjs",
"module": "dist/bitbazaar/index.js",
"types": "dist/bitbazaar/index.d.ts",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"sideEffects": false,
"files": [
"dist"
Expand Down
13 changes: 3 additions & 10 deletions js/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,13 @@ import type { Options } from "tsup";

// https://dev.to/orabazu/how-to-bundle-a-tree-shakable-typescript-library-with-tsup-and-publish-with-npm-3c46
export const tsup: Options = {
splitting: true,
clean: true, // clean up the dist folder
dts: true, // generate dts files
format: ["cjs", "esm"], // generate cjs and esm files
minify: true,
bundle: false,
format: ["esm"], // Only support ESM, fixes lots of import problems
minify: false, // Again allow downstream consumers to minify
bundle: false, // Don't bundle, allow downstream consumers to bundle
skipNodeModulesBundle: true,
entryPoints: ["bitbazaar/index.ts"],
watch: false,
target: "es2020",
outDir: "./dist",
entry: ["bitbazaar/**/*.ts"], // look at all files in the project
esbuildOptions(options, context) {
// the directory structure will be the same as the source
options.outbase = "./";
},
};

0 comments on commit 9ea8828

Please sign in to comment.