Skip to content

Commit

Permalink
Merge pull request #66 from bob-collective/fix/playgrounds-packages
Browse files Browse the repository at this point in the history
fix: sats-wagmi package.json
  • Loading branch information
gregdhill authored Sep 5, 2024
2 parents ab83aff + 092063d commit 5b1fe2c
Show file tree
Hide file tree
Showing 4 changed files with 435 additions and 25 deletions.
13 changes: 4 additions & 9 deletions packages/sats-wagmi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,7 @@
"btc wallet connector hooks",
"btc wallet connector config"
],
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"main": "src/index.ts",
"files": [
"dist"
],
Expand All @@ -38,7 +31,9 @@
"lint:fix": "eslint . --ext ts,tsx --fix",
"clean": "rimraf dist .turbo",
"typecheck": "tsc --noEmit",
"build": "tsup src/index.ts --dts"
"build": "tsup src/index.ts --dts",
"prepack": "clean-package",
"postpack": "clean-package restore"
},
"peerDependencies": {
"react": ">=18",
Expand Down
7 changes: 4 additions & 3 deletions playgrounds/vite-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,22 @@
"preview": "vite preview"
},
"dependencies": {
"@gobob/sats-wagmi": "workspace:*",
"@tanstack/query-sync-storage-persister": "5.0.5",
"@tanstack/react-query": ">=5.45.1",
"@tanstack/react-query-persist-client": "5.0.5",
"idb-keyval": "^6.2.1",
"react": ">=18.3.1",
"react-dom": ">=18.3.1",
"viem": "2.*",
"@gobob/sats-wagmi": "workspace:*"
"viem": "2.*"
},
"devDependencies": {
"@tanstack/react-query-devtools": "5.0.5",
"@types/react": ">=18.3.1",
"@types/react-dom": ">=18.3.0",
"@vitejs/plugin-react": "^4.2.1",
"buffer": "^6.0.3",
"vite": "^5.2.11"
"vite": "^5.2.11",
"vite-plugin-node-polyfills": "^0.22.0"
}
}
25 changes: 24 additions & 1 deletion playgrounds/vite-react/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,30 @@
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';
import { nodePolyfills } from 'vite-plugin-node-polyfills';

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()]
plugins: [
react(),
nodePolyfills({
include: ['path'],
// To exclude specific polyfills, add them to this list. Note: if include is provided, this has no effect
exclude: [
'http' // Excludes the polyfill for `http` and `node:http`.
],
// Whether to polyfill specific globals.
globals: {
Buffer: true, // can also be 'build', 'dev', or false
global: true,
process: true
},
// Override the default polyfills for specific modules.
overrides: {
// Since `fs` is not supported in browsers, we can use the `memfs` package to polyfill it.
fs: 'memfs'
},
// Whether to polyfill `node:` protocol imports.
protocolImports: true
})
]
});
Loading

0 comments on commit 5b1fe2c

Please sign in to comment.