Skip to content

Commit

Permalink
build(ts-sdk): make iife build work for browsers
Browse files Browse the repository at this point in the history
  • Loading branch information
jjleng authored and banool committed Sep 15, 2022
1 parent 9212214 commit ecbf7f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 5 additions & 2 deletions ecosystem/typescript/sdk/package.json
Expand Up @@ -15,8 +15,11 @@
}
},
"scripts": {
"prepack": "tsup",
"build": "tsup",
"prepack": "yarn build",
"build": "yarn build:clean && yarn _build:node && yarn _build:browser",
"build:clean": "rm -rf dist",
"_build:browser": "tsup --platform browser --format iife --global-name aptosSDK",
"_build:node": "tsup --format cjs,esm --dts",
"lint": "eslint \"**/*.ts\"",
"test": "jest",
"_fmt": "prettier 'src/**/*.ts' 'examples/**/*.js' 'examples/**/*.ts' '.eslintrc.js'",
Expand Down
4 changes: 0 additions & 4 deletions ecosystem/typescript/sdk/tsup.config.js
Expand Up @@ -2,10 +2,6 @@ import { defineConfig } from "tsup";

export default defineConfig({
entry: ["src/index.ts"],
format: ["esm", "cjs"],
splitting: false,
sourcemap: true,
clean: true,
dts: true,
globalName: "aptosSDK",
});

0 comments on commit ecbf7f5

Please sign in to comment.