Skip to content

Commit

Permalink
prod build: fix NODE_ENV + dont publish src dir (#872)
Browse files Browse the repository at this point in the history
* save

* fix walletconnect pkg build

* changeset
  • Loading branch information
mPaella authored Nov 22, 2024
1 parent bd69ca3 commit e267c9f
Show file tree
Hide file tree
Showing 19 changed files with 98 additions and 161 deletions.
17 changes: 17 additions & 0 deletions .changeset/twelve-lies-compete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
"@crossmint/client-sdk-smart-wallet-web3auth-adapter": patch
"@crossmint/client-sdk-verifiable-credentials": patch
"@crossmint/client-sdk-walletconnect": patch
"@crossmint/client-sdk-smart-wallet": patch
"@crossmint/client-sdk-vanilla-ui": patch
"@crossmint/client-sdk-react-ui": patch
"@crossmint/client-sdk-vue-ui": patch
"@crossmint/client-sdk-window": patch
"@crossmint/client-sdk-auth": patch
"@crossmint/client-sdk-base": patch
"@crossmint/common-sdk-auth": patch
"@crossmint/common-sdk-base": patch
"@crossmint/server-sdk": patch
---

chore: remove source maps
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
"build": "pnpm turbo build",
"build:apps": "pnpm turbo --filter \"./apps/**\" build",
"build:libs": "pnpm turbo --filter \"./packages/**\" build",
"build:libs:prod": "cross-env NODE_ENV=production pnpm build:libs",
"change:add": "pnpm changeset add",
"change:publish": "cross-env NODE_ENV=production pnpm build:libs && pnpm changeset publish --no-git-tag",
"change:publish": "pnpm build:libs:prod && pnpm changeset publish --no-git-tag",
"change:version": "pnpm changeset version && pnpm lint:fix",
"clean:dist": "pnpm rimraf \"**/dist\" --glob",
"clean:next": "pnpm rimraf \"**/.next\" --glob",
Expand Down
2 changes: 1 addition & 1 deletion packages/client/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": ["dist", "src", "LICENSE"],
"files": ["dist", "LICENSE"],
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
Expand Down
2 changes: 1 addition & 1 deletion packages/client/base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": ["dist", "src", "LICENSE"],
"files": ["dist", "LICENSE"],
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
Expand Down
2 changes: 1 addition & 1 deletion packages/client/ui/react-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": ["dist", "src", "LICENSE"],
"files": ["dist", "LICENSE"],
"scripts": {
"build": "cross-env NODE_OPTIONS='--max-old-space-size=8192' tsup",
"dev": "cross-env NODE_OPTIONS='--max-old-space-size=8192' tsup --watch",
Expand Down
2 changes: 1 addition & 1 deletion packages/client/ui/vanilla-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": ["dist", "src", "LICENSE"],
"files": ["dist", "LICENSE"],
"scripts": {
"build": "tsup src/index.ts --clean --format esm,cjs,iife --outDir ./dist --minify --dts --sourcemap",
"dev": "tsup src/index.ts --clean --format esm,cjs,iife --outDir ./dist --dts --sourcemap --watch"
Expand Down
2 changes: 1 addition & 1 deletion packages/client/ui/vue-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": ["dist", "src", "LICENSE"],
"files": ["dist", "LICENSE"],
"scripts": {
"dev": "vite",
"type-check-and-build": "run-p type-check build-only",
Expand Down
2 changes: 1 addition & 1 deletion packages/client/verifiable-credentials/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": ["dist", "src", "LICENSE"],
"files": ["dist", "LICENSE"],
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
Expand Down
2 changes: 1 addition & 1 deletion packages/client/wallets/smart-wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": ["dist", "src", "LICENSE"],
"files": ["dist", "LICENSE"],
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
Expand Down
16 changes: 8 additions & 8 deletions packages/client/wallets/walletconnect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"style": "./dist/index.css",
"files": ["dist", "src", "LICENSE"],
"files": ["dist", "LICENSE"],
"scripts": {
"build": "tsup src/index.ts --clean --external react,react-dom --format esm,cjs --outDir ./dist --minify --dts --sourcemap",
"dev": "tsup src/index.ts --clean --external react,react-dom --format esm,cjs --outDir ./dist --dts --sourcemap --watch"
"build": "tsup",
"dev": "tsup --watch"
},
"dependencies": {
"@crossmint/common-sdk-base": "0.0.12",
"@crossmint/common-sdk-base": "workspace:*",
"@ethersproject/bytes": "5.7.0",
"@headlessui/react": "1.7.18",
"@heroicons/react": "2.1.1",
Expand All @@ -43,12 +43,12 @@
"@ethersproject/abstract-provider": "5.7.0",
"@ethersproject/providers": "5.7.2",
"@solana/web3.js": "1.95.1",
"@types/react": "18.2.21",
"@types/react-dom": "18.2.7",
"@types/react": "^18.3.0",
"@types/react-dom": "^18.3.0",
"autoprefixer": "10.4.17",
"postcss": "8.4.35",
"react": "18.2.0",
"react-dom": "18.2.0",
"react": "^18.3.0",
"react-dom": "^18.3.0",
"tailwindcss": "3.4.1"
},
"peerDependencies": {
Expand Down
10 changes: 10 additions & 0 deletions packages/client/wallets/walletconnect/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import type { Options } from "tsup";

import { treeShakableConfig } from "../../../../tsup.config.base";

const config: Options = {
...treeShakableConfig,
external: ["react", "react-dom"],
};

export default config;
7 changes: 3 additions & 4 deletions packages/client/wallets/web3auth-adapter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": ["dist", "src", "LICENSE"],
"files": ["dist", "LICENSE"],
"scripts": {
"build": "tsup src/index.ts --clean --format esm,cjs --outDir ./dist --minify --dts --sourcemap",
"build-no-minify": "tsup src/index.ts --clean --format esm,cjs --outDir ./dist --dts --sourcemap",
"dev": "tsup src/index.ts --clean --format esm,cjs --outDir ./dist --dts --sourcemap --watch",
"build": "tsup",
"dev": "tsup --watch",
"test:vitest": "cross-env NODE_ENV=test jest"
},
"dependencies": {
Expand Down
3 changes: 3 additions & 0 deletions packages/client/wallets/web3auth-adapter/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { treeShakableConfig } from "../../../../tsup.config.base";

export default treeShakableConfig;
2 changes: 1 addition & 1 deletion packages/client/window/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": ["dist", "src", "LICENSE"],
"files": ["dist", "LICENSE"],
"scripts": {
"build": "tsup",
"dev": "tsup --watch"
Expand Down
2 changes: 1 addition & 1 deletion packages/common/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"files": ["dist", "src", "LICENSE"],
"files": ["dist", "LICENSE"],
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
Expand Down
2 changes: 1 addition & 1 deletion packages/common/base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": ["dist", "src", "LICENSE"],
"files": ["dist", "LICENSE"],
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
Expand Down
2 changes: 1 addition & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": ["dist", "src", "LICENSE"],
"files": ["dist", "LICENSE"],
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
Expand Down
Loading

0 comments on commit e267c9f

Please sign in to comment.