From aa023d3783c58df89ffb11518f26629a3f486412 Mon Sep 17 00:00:00 2001 From: iain nash Date: Thu, 19 Oct 2023 23:43:13 -0400 Subject: [PATCH] adding mjs build --- packages/1155-contracts/package.json | 14 +++++++++++++- packages/1155-contracts/tsup.config.ts | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/1155-contracts/package.json b/packages/1155-contracts/package.json index 1d39084b5..0765e0c27 100644 --- a/packages/1155-contracts/package.json +++ b/packages/1155-contracts/package.json @@ -4,8 +4,20 @@ "repository": "git@github.com:ourzora/zora-protocol.git", "author": "Iain ", "license": "MIT", - "main": "./dist/index.cjs", + "main": "./dist/index.js", "types": "./dist/package/index.d.ts", + "exports": { + "./premint-api": { + "require": "./dist/premint-api.cjs", + "import": "./dist/premint-api.js", + "types": "./dist/package/premint-api.d.ts" + }, + ".": { + "require": "./dist/index.cjs", + "import": "./dist/index.js", + "types": "./dist/package/index.d.ts" + } + }, "type": "module", "scripts": { "test": "forge test", diff --git a/packages/1155-contracts/tsup.config.ts b/packages/1155-contracts/tsup.config.ts index 26e82bca4..d2df92701 100644 --- a/packages/1155-contracts/tsup.config.ts +++ b/packages/1155-contracts/tsup.config.ts @@ -5,6 +5,6 @@ export default defineConfig({ sourcemap: true, clean: true, dts: false, - format: ['cjs'], + format: ['cjs', 'esm'], onSuccess: 'tsc --emitDeclarationOnly --declaration --declarationMap' }) \ No newline at end of file