Skip to content

Commit e267c9f

Browse files
authored
prod build: fix NODE_ENV + dont publish src dir (#872)
* save * fix walletconnect pkg build * changeset
1 parent bd69ca3 commit e267c9f

File tree

19 files changed

+98
-161
lines changed

19 files changed

+98
-161
lines changed

.changeset/twelve-lies-compete.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
"@crossmint/client-sdk-smart-wallet-web3auth-adapter": patch
3+
"@crossmint/client-sdk-verifiable-credentials": patch
4+
"@crossmint/client-sdk-walletconnect": patch
5+
"@crossmint/client-sdk-smart-wallet": patch
6+
"@crossmint/client-sdk-vanilla-ui": patch
7+
"@crossmint/client-sdk-react-ui": patch
8+
"@crossmint/client-sdk-vue-ui": patch
9+
"@crossmint/client-sdk-window": patch
10+
"@crossmint/client-sdk-auth": patch
11+
"@crossmint/client-sdk-base": patch
12+
"@crossmint/common-sdk-auth": patch
13+
"@crossmint/common-sdk-base": patch
14+
"@crossmint/server-sdk": patch
15+
---
16+
17+
chore: remove source maps

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
"build": "pnpm turbo build",
99
"build:apps": "pnpm turbo --filter \"./apps/**\" build",
1010
"build:libs": "pnpm turbo --filter \"./packages/**\" build",
11+
"build:libs:prod": "cross-env NODE_ENV=production pnpm build:libs",
1112
"change:add": "pnpm changeset add",
12-
"change:publish": "cross-env NODE_ENV=production pnpm build:libs && pnpm changeset publish --no-git-tag",
13+
"change:publish": "pnpm build:libs:prod && pnpm changeset publish --no-git-tag",
1314
"change:version": "pnpm changeset version && pnpm lint:fix",
1415
"clean:dist": "pnpm rimraf \"**/dist\" --glob",
1516
"clean:next": "pnpm rimraf \"**/.next\" --glob",

packages/client/auth/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"main": "./dist/index.cjs",
1414
"module": "./dist/index.js",
1515
"types": "./dist/index.d.ts",
16-
"files": ["dist", "src", "LICENSE"],
16+
"files": ["dist", "LICENSE"],
1717
"scripts": {
1818
"build": "tsup",
1919
"dev": "tsup --watch",

packages/client/base/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"main": "./dist/index.cjs",
1414
"module": "./dist/index.js",
1515
"types": "./dist/index.d.ts",
16-
"files": ["dist", "src", "LICENSE"],
16+
"files": ["dist", "LICENSE"],
1717
"scripts": {
1818
"build": "tsup",
1919
"dev": "tsup --watch",

packages/client/ui/react-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"main": "./dist/index.cjs",
1414
"module": "./dist/index.js",
1515
"types": "./dist/index.d.ts",
16-
"files": ["dist", "src", "LICENSE"],
16+
"files": ["dist", "LICENSE"],
1717
"scripts": {
1818
"build": "cross-env NODE_OPTIONS='--max-old-space-size=8192' tsup",
1919
"dev": "cross-env NODE_OPTIONS='--max-old-space-size=8192' tsup --watch",

packages/client/ui/vanilla-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"main": "./dist/index.cjs",
1919
"module": "./dist/index.js",
2020
"types": "./dist/index.d.ts",
21-
"files": ["dist", "src", "LICENSE"],
21+
"files": ["dist", "LICENSE"],
2222
"scripts": {
2323
"build": "tsup src/index.ts --clean --format esm,cjs,iife --outDir ./dist --minify --dts --sourcemap",
2424
"dev": "tsup src/index.ts --clean --format esm,cjs,iife --outDir ./dist --dts --sourcemap --watch"

packages/client/ui/vue-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"main": "./dist/index.cjs",
1414
"module": "./dist/index.js",
1515
"types": "./dist/index.d.ts",
16-
"files": ["dist", "src", "LICENSE"],
16+
"files": ["dist", "LICENSE"],
1717
"scripts": {
1818
"dev": "vite",
1919
"type-check-and-build": "run-p type-check build-only",

packages/client/verifiable-credentials/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"main": "./dist/index.cjs",
1414
"module": "./dist/index.js",
1515
"types": "./dist/index.d.ts",
16-
"files": ["dist", "src", "LICENSE"],
16+
"files": ["dist", "LICENSE"],
1717
"scripts": {
1818
"build": "tsup",
1919
"dev": "tsup --watch",

packages/client/wallets/smart-wallet/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"main": "./dist/index.cjs",
1414
"module": "./dist/index.js",
1515
"types": "./dist/index.d.ts",
16-
"files": ["dist", "src", "LICENSE"],
16+
"files": ["dist", "LICENSE"],
1717
"scripts": {
1818
"build": "tsup",
1919
"dev": "tsup --watch",

packages/client/wallets/walletconnect/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
"module": "./dist/index.js",
2121
"types": "./dist/index.d.ts",
2222
"style": "./dist/index.css",
23-
"files": ["dist", "src", "LICENSE"],
23+
"files": ["dist", "LICENSE"],
2424
"scripts": {
25-
"build": "tsup src/index.ts --clean --external react,react-dom --format esm,cjs --outDir ./dist --minify --dts --sourcemap",
26-
"dev": "tsup src/index.ts --clean --external react,react-dom --format esm,cjs --outDir ./dist --dts --sourcemap --watch"
25+
"build": "tsup",
26+
"dev": "tsup --watch"
2727
},
2828
"dependencies": {
29-
"@crossmint/common-sdk-base": "0.0.12",
29+
"@crossmint/common-sdk-base": "workspace:*",
3030
"@ethersproject/bytes": "5.7.0",
3131
"@headlessui/react": "1.7.18",
3232
"@heroicons/react": "2.1.1",
@@ -43,12 +43,12 @@
4343
"@ethersproject/abstract-provider": "5.7.0",
4444
"@ethersproject/providers": "5.7.2",
4545
"@solana/web3.js": "1.95.1",
46-
"@types/react": "18.2.21",
47-
"@types/react-dom": "18.2.7",
46+
"@types/react": "^18.3.0",
47+
"@types/react-dom": "^18.3.0",
4848
"autoprefixer": "10.4.17",
4949
"postcss": "8.4.35",
50-
"react": "18.2.0",
51-
"react-dom": "18.2.0",
50+
"react": "^18.3.0",
51+
"react-dom": "^18.3.0",
5252
"tailwindcss": "3.4.1"
5353
},
5454
"peerDependencies": {
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import type { Options } from "tsup";
2+
3+
import { treeShakableConfig } from "../../../../tsup.config.base";
4+
5+
const config: Options = {
6+
...treeShakableConfig,
7+
external: ["react", "react-dom"],
8+
};
9+
10+
export default config;

packages/client/wallets/web3auth-adapter/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@
1313
"main": "./dist/index.cjs",
1414
"module": "./dist/index.js",
1515
"types": "./dist/index.d.ts",
16-
"files": ["dist", "src", "LICENSE"],
16+
"files": ["dist", "LICENSE"],
1717
"scripts": {
18-
"build": "tsup src/index.ts --clean --format esm,cjs --outDir ./dist --minify --dts --sourcemap",
19-
"build-no-minify": "tsup src/index.ts --clean --format esm,cjs --outDir ./dist --dts --sourcemap",
20-
"dev": "tsup src/index.ts --clean --format esm,cjs --outDir ./dist --dts --sourcemap --watch",
18+
"build": "tsup",
19+
"dev": "tsup --watch",
2120
"test:vitest": "cross-env NODE_ENV=test jest"
2221
},
2322
"dependencies": {
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { treeShakableConfig } from "../../../../tsup.config.base";
2+
3+
export default treeShakableConfig;

packages/client/window/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"main": "./dist/index.cjs",
1414
"module": "./dist/index.js",
1515
"types": "./dist/index.d.ts",
16-
"files": ["dist", "src", "LICENSE"],
16+
"files": ["dist", "LICENSE"],
1717
"scripts": {
1818
"build": "tsup",
1919
"dev": "tsup --watch"

packages/common/auth/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"import": "./dist/index.js",
1414
"require": "./dist/index.cjs"
1515
},
16-
"files": ["dist", "src", "LICENSE"],
16+
"files": ["dist", "LICENSE"],
1717
"scripts": {
1818
"build": "tsup",
1919
"dev": "tsup --watch",

packages/common/base/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"main": "./dist/index.cjs",
1414
"module": "./dist/index.js",
1515
"types": "./dist/index.d.ts",
16-
"files": ["dist", "src", "LICENSE"],
16+
"files": ["dist", "LICENSE"],
1717
"scripts": {
1818
"build": "tsup",
1919
"dev": "tsup --watch",

packages/server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"main": "./dist/index.cjs",
1414
"module": "./dist/index.js",
1515
"types": "./dist/index.d.ts",
16-
"files": ["dist", "src", "LICENSE"],
16+
"files": ["dist", "LICENSE"],
1717
"scripts": {
1818
"build": "tsup",
1919
"dev": "tsup --watch",

0 commit comments

Comments
 (0)