@svelte-on-solana/wallet-adapter-anchor
Advanced tools
Comparing version 1.0.14-alpha.0 to 1.0.15-alpha.0
{ | ||
"name": "@svelte-on-solana/wallet-adapter-anchor", | ||
"version": "1.0.14-alpha.0", | ||
"version": "1.0.15-alpha.0", | ||
"author": "Svelte on Solana", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/svelte-on-solana/wallet-adapter", |
@@ -15,20 +15,19 @@ # `@svelte-on-solana/wallet-adapter-anchor` | ||
Add `@project-serum/anchor` to `optimizeDeps`. This pre-bundles the `@project-serum/anchor` package. This steps converts commonJs dependencies into ESM ( Vite's dev server serves all code as native ESM ). | ||
Add `@project-serum/anchor` to `optimizeDeps` inside `vite.config.js`. This pre-bundles the `@project-serum/anchor` package. This steps converts CommonJS dependencies into ESM ( Vite's dev server serves all code as native ESM ). | ||
```javascript | ||
import { sveltekit } from '@sveltejs/kit/vite' | ||
/** @type {import('vite').UserConfig} */ | ||
const config = { | ||
// ... | ||
kit: { | ||
// ... | ||
vite: { | ||
// ... | ||
define: { | ||
'process.env.BROWSER': true | ||
}, | ||
optimizeDeps: { | ||
include: ['@project-serum/anchor', '@solana/web3.js', 'buffer'], | ||
} | ||
} | ||
plugins: [sveltekit()], | ||
define: { | ||
'process.env.BROWSER': true | ||
}, | ||
optimizeDeps: { | ||
include: ['@project-serum/anchor', '@solana/web3.js', 'buffer'], | ||
} | ||
}; | ||
} | ||
export default config | ||
``` | ||
@@ -51,3 +50,2 @@ | ||
<script lang="ts"> | ||
import { onMount } from 'svelte'; | ||
import { walletStore } from '@svelte-on-solana/wallet-adapter-core'; | ||
@@ -63,11 +61,3 @@ import { WalletProvider, WalletMultiButton } from '@svelte-on-solana/wallet-adapter-ui'; | ||
let wallets; | ||
onMount(async () => { | ||
const { PhantomWalletAdapter, SolflareWalletAdapter } = await import( | ||
'@solana/wallet-adapter-wallets' | ||
); | ||
wallets = [new PhantomWalletAdapter(), new SolflareWalletAdapter()]; | ||
}); | ||
let wallets = [new PhantomWalletAdapter(), new SolflareWalletAdapter()];; | ||
</script> | ||
@@ -74,0 +64,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19267
105