Skip to content

Commit

Permalink
fix: fix umd exports
Browse files Browse the repository at this point in the history
  • Loading branch information
cmartinho committed Mar 15, 2024
1 parent b1e96b8 commit 7ef437d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/gorgeous-singers-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@shadeprotocol/shadejs": patch
---

Fix umd exports
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.umd.cjs"
"require": "./dist/index.umd.cjs",
"default": "./dist/shadejs.umd.cjs"
}
},
"files": [
Expand Down
6 changes: 6 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ export default defineConfig({
entry: path.resolve(__dirname, 'src/index.ts'),
name: 'shadejs',
fileName: 'index',
formats: ['es', 'umd'], // Generate both ES module and UMD formats
umd: {
globals: {
secretjs: 'secretjs'
},
},
},
},
plugins: [
Expand Down

0 comments on commit 7ef437d

Please sign in to comment.