Skip to content

Commit

Permalink
Merge pull request #187 from vu3th/fix/vite-hot-reload
Browse files Browse the repository at this point in the history
Fix vite hot reload issue
  • Loading branch information
johnson86tw committed May 13, 2024
2 parents 39dc908 + 14762c9 commit bd4bb44
Show file tree
Hide file tree
Showing 4 changed files with 20,308 additions and 23,970 deletions.
43 changes: 22 additions & 21 deletions app/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
import { BrowserWalletConnector, useVueDapp, type ConnWallet } from '@vue-dapp/core'
import { VueDappModal } from '@vue-dapp/modal'
import '@vue-dapp/modal/dist/style.css'
// import { WalletConnectConnector } from '@vue-dapp/walletconnect'
// import { CoinbaseWalletConnector } from '@vue-dapp/coinbase'
import { WalletConnectConnector } from '@vue-dapp/walletconnect'
import { CoinbaseWalletConnector } from '@vue-dapp/coinbase'
import { INFURA_ID } from './constants'
import { darkTheme, lightTheme, type GlobalThemeOverrides } from 'naive-ui'
import { useAppStore } from './stores/appStore'
Expand All @@ -26,25 +27,25 @@ const { addConnectors, watchWalletChanged, watchDisconnect, onDisconnect, onAcco
if (process.client) {
addConnectors([
new BrowserWalletConnector(),
// new WalletConnectConnector({
// projectId: 'd1e65611568666138126d315c0bafd7d',
// chains: [1],
// showQrModal: true,
// qrModalOptions: {
// themeMode: 'light',
// themeVariables: undefined,
// desktopWallets: undefined,
// walletImages: undefined,
// mobileWallets: undefined,
// enableExplorer: true,
// privacyPolicyUrl: undefined,
// termsOfServiceUrl: undefined,
// },
// }),
// new CoinbaseWalletConnector({
// appName: 'Vue Dapp',
// jsonRpcUrl: `https://mainnet.infura.io/v3/${INFURA_ID}`,
// }),
new WalletConnectConnector({
projectId: 'd1e65611568666138126d315c0bafd7d',
chains: [1],
showQrModal: true,
qrModalOptions: {
themeMode: 'light',
themeVariables: undefined,
desktopWallets: undefined,
walletImages: undefined,
mobileWallets: undefined,
enableExplorer: true,
privacyPolicyUrl: undefined,
termsOfServiceUrl: undefined,
},
}),
new CoinbaseWalletConnector({
appName: 'Vue Dapp',
jsonRpcUrl: `https://mainnet.infura.io/v3/${INFURA_ID}`,
}),
])
}
if (process.client) {
Expand Down
8 changes: 8 additions & 0 deletions packages/coinbase/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,13 @@ export default defineConfig({
fileName: name,
},
outDir: 'dist',
rollupOptions: {
external: ['vue'],
output: {
globals: {
vue: 'vue',
},
},
},
},
})
3 changes: 2 additions & 1 deletion packages/walletconnect/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ export default defineConfig({
},
outDir: 'dist',
rollupOptions: {
external: ['@walletconnect/ethereum-provider'],
external: ['@walletconnect/ethereum-provider', 'vue'],
output: {
globals: {
'@walletconnect/ethereum-provider': 'EthereumProvider',
vue: 'vue',
},
},
},
Expand Down

0 comments on commit bd4bb44

Please sign in to comment.