Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
バックエンドエンジニアが行うSvelte + Vite なフロントエンド構築
Search
shiro seike
PRO
November 19, 2022
Technology
1.8k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
バックエンドエンジニアが行うSvelte + Vite なフロントエンド構築
shiro seike
PRO
November 19, 2022
More Decks by shiro seike
See All by shiro seike
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
480
コミュニティの有益性 ~JAWS Days 2026 での体験を通して~ / The Benefits of a Community ~Through My Experience at JAWS Days 2026~
seike460
PRO
0
350
Architecture as SteeringOn-Ramp to AI-DLC
seike460
PRO
0
40
Why Continue AWS Community Builders
seike460
PRO
0
79
AWSコミュニティ活動は顧客のクラウド推進に効くのか / Do AWS community activities help customers adopt the cloud?
seike460
PRO
0
190
テレメトリーシグナルが導くパフォーマンス最適化 / Performance Optimization Driven by Telemetry Signals
seike460
PRO
2
300
AI-DLC 入門 〜AIコーディングの本質は「コード」ではなく「構造」〜 / Introduction to AI-DLC: The Essence of AI Coding Is Not “Code” but “Structure”
seike460
PRO
0
1.9k
今さら聞けないサーバーレスのいいところ 〜運用から解放される世界を目指して〜 / The Benefits of Serverless You Might Be Too Embarrassed to Ask About Now — Aiming for a World Free from Operational Burdens
seike460
PRO
0
110
AWS Lambda Durable Functions のユースケースを探る / Exploring Use Cases for AWS Lambda Durable Functions
seike460
PRO
0
100
Other Decks in Technology
See All in Technology
運用を犠牲にせずコストを制御し事業成長を支える B2B SaaS ID管理基盤におけるS3 Tableのログストレージ活用
kaminashi
1
100
なぜMIXIはゼロトラスト基盤として クラウドフレアを選んだのか - Cloudflare Peer Point SASE User Voices
mixi_engineers
PRO
2
140
クラウドを使う側から、作る側へ / 大吉祥寺.pm 2026前夜祭
fujiwara3
7
1.7k
人依存からAIネイティブの体制へ:バックエンド開発の裏側【SORACOM Discovery 2026】
soracom
PRO
0
130
AIで楽になるはずが、なぜ疲れる?
kinopeee
0
130
システム監視入門
grimoh
5
740
歴史から理解するクラウドインフラのしくみ
kizawa2020
0
190
コンポーネント名には何を含めるべきなのか? / what-should-be-included-in-component-names
airrnot1106
0
180
SRENEXT_2026_Chairs__Talks_in_Tamachi.sre.pdf
srenext
1
170
エンタープライズデータへ安全につなぐ Production-ready なエージェント設計 ― AI × MCP リファレンスアーキテクチャ ― #AIDevDay
cdataj
1
300
現場をAIで動かす「フィジカル AI」の組み込み設計の考え方【SORACOM Discovery 2026】
soracom
PRO
0
150
AIエージェントの知識表現と推論に なぜグラフが使われるのか - 記号的AIの復権とニューラルAIとの統合
yohei1126
1
200
Featured
See All Featured
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
370
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
57k
Balancing Empowerment & Direction
lara
6
1.2k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
230
Skip the Path - Find Your Career Trail
mkilby
1
170
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.1k
First, design no harm
axbom
PRO
2
1.2k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
190
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
520
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
Transcript
バ ド ジ が Svelte + Vite ド 2022
2 0 22 . 11 . 19 @seike 4 60 1
@seike 460 - - @seike 46 0 - Fusic -
/ - / / - - PHP - PHP - PHPerKaigi - JAWS Days - AWS Dev Day 2
Agenda 1 .Svelte + Vite 2 .Svelte 3 .Svelte 4
.Vite 5 .Vite 6 . 3
01 Svelte + Vite
5
6
Svelte + Vite + Tailwind CSS 7
02 Svelte
Svelte JavaScript Vite Svelte Svelte Write less code No
virtual DOM DOM Truly reactive Hooks 9
Write less code - React 10 import React, { useState
} from 'react'; export default () => { const [a, setA] = useState( 1 ); const [b, setB] = useState( 2 ); function handleChangeA(event) { setA(+event.target.value); } function handleChangeB(event) { setB(+event.target.value); } return ( <div> <input type="number" value={a} onChange={handleChangeA}/> <input type="number" value={b} onChange={handleChangeB}/> <p>{a} + {b} = {a + b}</p> </div> ); }; UI React State Hook State State input State UI
Write less code - Svelte 11 <script> let a =
1 ; let b = 2 ; </script> <input type="number" bind:value={a}> <input type="number" bind:value={b}> <p>{a} + {b} = {a + b}</p> Svelte let State bind 築 [a] input p [a]
Write less code + Truly reactive 12 <script> let a
= 1 ; let b = 2 ; </script> <input type="number" bind:value={a}> <input type="number" bind:value={b}> <p>{a} + {b} = {a + b}</p> Svelte
TEMPLATE SYNTAX 13 {#if porridge.temperature > 1 00 } <p>too
hot!</p> {:else if 8 0 > porridge.temperature} <p>too cold!</p> {:else} <p>just right!</p> {/if} {#each items as item} <li>{item.name} x {item.qty}</li> {/each} {#await promise} <p>waiting for the promise to resolve...</p> {:then value} <p>The value is {value}</p> {:catch error} <p>Something went wrong: {error.message}</p> {/await} {#key value} <div transition:fade>{value}</div> {/key} {#if }... {:else if } {/if} {#each as name, index} ... {/each} {#await }... {:then name}... {:catch name} … {/await} {#key }... {/key}
Props Props export Props 14 Counter.svelte App.svelte
$: $: JS 15
Store 16
Store React Redux Vue Vuex Store writable Store
subscribe update set Store 17
Context API Svelte ContextAPI setContext getContext hasContext getAllContexts context
context 18 Counter.svelte App.svelte
Context API 19 Counter.svelte App.svelte
Component Hooks onMount DOM beforeUpdate state afterUpdate onDestroy tick state
resolve promise 20
No virtual DOM Virtual DOM Dom Virtual DOM
Svelte DOM 21
krausest React Vue Svelte 22 https://krausest.github.io/js-framework-benchmark/current.html
03 Svelte
👍 HTML CSS Javascript 🙏 $: 24
Made With Svelte Svelte Society Example 25
SvelteKit … 26
04 Vite
Vite HMR Rollup 28
ES Modules - Bundle - import export - ES
Modules - 29 https://vitejs.dev/guide/why.html#slow-server-start
vite.config.js Vite vite.config.js Production Staging loadEnv
.env Svelte Import.meta.env. prefix VITE_ 30 vite.config.js Svelte
05 Vite
👍 32
Svelte + Vite
34
06
36 Svelte UI Point 1 Example Point 2 Vite 頻
Point 3 Point 4
Thank You We are Hiring ! https://recruit.fusic.co.jp/