Skip to content

Commit

Permalink
migrated to svelte 1.o
Browse files Browse the repository at this point in the history
  • Loading branch information
muttoni committed Jan 15, 2023
1 parent 9a44fb6 commit 6082051
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 17 deletions.
17 changes: 8 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@
"preview": "vite preview"
},
"devDependencies": {
"@onflow/fcl": "^1.0.2",
"@onflow/fcl": "^1.3.2",
"@picocss/pico": "^1.5.0",
"@sveltejs/adapter-auto": "^1.0.0-next.43",
"@sveltejs/kit": "^1.0.0-next.350",
"@sveltejs/vite-plugin-svelte": "^1.0.0-next.44",
"svelte": "^3.48.0"
"@rollup/plugin-inject": "^5.0.3",
"@sveltejs/adapter-auto": "^1.0.1",
"@sveltejs/kit": "^1.1.1",
"svelte": "^3.55.1",
"vite": "^4.0.4",
"vite-plugin-node-polyfills": "^0.7.0"
},
"type": "module",
"dependencies": {
"vite": "^3.0.0"
}
"type": "module"
}
2 changes: 1 addition & 1 deletion src/flow/actions.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { browser } from '$app/env';
import { browser } from '$app/environment';
import { get } from 'svelte/store';

import * as fcl from "@onflow/fcl";
Expand Down
10 changes: 5 additions & 5 deletions src/lib/Transaction.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<span>
<kbd>Pending</kbd>
<span class="txId">
<a href={`https://testnet.flowscan.org/transaction/${$txId}`} target="_blank">
<a href={`https://testnet.flowscan.org/transaction/${$txId}`} rel="noreferrer" target="_blank">
{$txId?.slice(0, 8)}...
</a>
</span><br/>
Expand All @@ -36,7 +36,7 @@
<span>
<kbd>Finalized</kbd>
<span class="txId">
<a href={`https://testnet.flowscan.org/transaction/${$txId}`} target="_blank">
<a href={`https://testnet.flowscan.org/transaction/${$txId}`} rel="noreferrer" target="_blank">
{$txId?.slice(0, 8)}...
</a>
</span><br/>
Expand All @@ -47,7 +47,7 @@
<span>
<kbd>Executed</kbd>
<span class="txId">
<a href={`https://testnet.flowscan.org/transaction/${$txId}`} target="_blank">
<a href={`https://testnet.flowscan.org/transaction/${$txId}`} rel="noreferrer" target="_blank">
{$txId?.slice(0, 8)}...
</a>
</span><br/>
Expand All @@ -60,7 +60,7 @@
<span>
<kbd>✓ Sealed</kbd>
<span class="txId">
<a href={`https://testnet.flowscan.org/transaction/${$txId}`} target="_blank">
<a href={`https://testnet.flowscan.org/transaction/${$txId}`} rel="noreferrer" target="_blank">
{$txId?.slice(0, 8)}...
</a>
</span><br/>
Expand All @@ -71,7 +71,7 @@
<span>
<kbd>Expired</kbd>
<span class="txId">
<a href={`https://testnet.flowscan.org/transaction/${$txId}`} target="_blank">
<a href={`https://testnet.flowscan.org/transaction/${$txId}`} rel="noreferrer" target="_blank">
{$txId?.slice(0, 8)}...
</a>
</span><br/>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 18 additions & 2 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
// vite.config.js
import { sveltekit } from '@sveltejs/kit/vite';
import { nodePolyfills } from 'vite-plugin-node-polyfills'
import inject from '@rollup/plugin-inject'

/** @type {import('vite').UserConfig} */
const config = {
plugins: [sveltekit()]
define: {
global: 'globalThis'
},
plugins: [
nodePolyfills({
// Whether to polyfill `node:` protocol imports.
protocolImports: true,
}),
sveltekit()
],
build: {
rollupOptions: {
plugins: [inject({ Buffer: ['buffer', 'Buffer'] })]
},
},
};

export default config;

1 comment on commit 6082051

@vercel
Copy link

@vercel vercel bot commented on 6082051 Jan 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

fcl-sveltekit – ./

fcl-sveltekit-git-main-muttoni.vercel.app
fcl-sveltekit-muttoni.vercel.app
fcl-sveltekit.vercel.app

Please sign in to comment.