Skip to content

Commit

Permalink
Add UMD build (colinhacks#1067)
Browse files Browse the repository at this point in the history
  • Loading branch information
rinsuki authored and MrAwesome committed May 20, 2022
1 parent 4a12656 commit bc16e4e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 2 additions & 0 deletions index.d.ts
@@ -0,0 +1,2 @@
export * from "./lib";
export as namespace Zod;
7 changes: 4 additions & 3 deletions package.json
Expand Up @@ -3,19 +3,20 @@
"version": "3.14.4",
"description": "TypeScript-first schema declaration and validation library with static type inference",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"types": "./index.d.ts",
"module": "./lib/index.mjs",
"dependencies": {},
"exports": {
".": {
"require": "./lib/index.js",
"import": "./lib/index.mjs",
"types": "./lib/index.d.ts"
"types": "./index.d.ts"
},
"./package.json": "./package.json"
},
"files": [
"/lib"
"/lib",
"/index.d.ts"
],
"repository": {
"type": "git",
Expand Down
6 changes: 6 additions & 0 deletions rollup.config.js
Expand Up @@ -10,6 +10,12 @@ export default [
format: "es",
sourcemap: false,
},
{
file: "lib/index.umd.js",
name: "Zod",
format: "umd",
sourcemap: false,
},
],
plugins: [
typescript({
Expand Down

0 comments on commit bc16e4e

Please sign in to comment.