Skip to content

Commit c7792de

Browse files
authored
Add UMD build (#1067)
1 parent a6e13cc commit c7792de

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

index.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from "./lib";
2+
export as namespace Zod;

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,20 @@
33
"version": "3.14.4",
44
"description": "TypeScript-first schema declaration and validation library with static type inference",
55
"main": "./lib/index.js",
6-
"types": "./lib/index.d.ts",
6+
"types": "./index.d.ts",
77
"module": "./lib/index.mjs",
88
"dependencies": {},
99
"exports": {
1010
".": {
1111
"require": "./lib/index.js",
1212
"import": "./lib/index.mjs",
13-
"types": "./lib/index.d.ts"
13+
"types": "./index.d.ts"
1414
},
1515
"./package.json": "./package.json"
1616
},
1717
"files": [
18-
"/lib"
18+
"/lib",
19+
"/index.d.ts"
1920
],
2021
"repository": {
2122
"type": "git",

rollup.config.js

+6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ export default [
1010
format: "es",
1111
sourcemap: false,
1212
},
13+
{
14+
file: "lib/index.umd.js",
15+
name: "Zod",
16+
format: "umd",
17+
sourcemap: false,
18+
},
1319
],
1420
plugins: [
1521
typescript({

0 commit comments

Comments
 (0)