Add UMD build (#1067)

This commit is contained in:
rinsuki 2022-04-08 04:49:05 +09:00 committed by GitHub
parent a6e13ccf9f
commit c7792de989
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 3 deletions

2
index.d.ts vendored Normal file
View File

@ -0,0 +1,2 @@
export * from "./lib";
export as namespace Zod;

View File

@ -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",

View File

@ -10,6 +10,12 @@ export default [
format: "es",
sourcemap: false,
},
{
file: "lib/index.umd.js",
name: "Zod",
format: "umd",
sourcemap: false,
},
],
plugins: [
typescript({