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
Vue.js Single File Components++
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
kazupon
April 28, 2017
Programming
8
1.8k
Vue.js Single File Components++
meguro.es x gotanda.js #1
kazupon
April 28, 2017
Tweet
Share
More Decks by kazupon
See All by kazupon
gunshi
kazupon
1
140
Nitro v3
kazupon
2
400
わたしのOSS活動
kazupon
3
570
Vapor Revolution
kazupon
3
3.9k
Vue.js最新動向
kazupon
3
1.6k
Vue 3.4
kazupon
13
4.8k
Vue & Vite Rustify
kazupon
4
2.4k
Vue.jsエコシステム動向2023
kazupon
17
8.2k
Reactivity Transform
kazupon
1
1.4k
Other Decks in Programming
See All in Programming
Basic Architectures
denyspoltorak
0
510
rack-attack gemによるリクエスト制限の失敗と学び
pndcat
0
240
re:Invent 2025 トレンドからみる製品開発への AI Agent 活用
yoskoh
0
680
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
330
CSC307 Lecture 02
javiergs
PRO
1
770
[AI Engineering Summit Tokyo 2025] LLMは計画業務のゲームチェンジャーか? 最適化業務における活⽤の可能性と限界
terryu16
2
400
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
250
[AtCoder Conference 2025] LLMを使った業務AHCの上⼿な解き⽅
terryu16
6
1.1k
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
5.6k
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
150
Pythonではじめるオープンデータ分析〜書籍の紹介と書籍で紹介しきれなかった事例の紹介〜
welliving
3
820
Kotlin Multiplatform Meetup - Compose Multiplatform 외부 의존성 아키텍처 설계부터 운영까지
wisemuji
0
180
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
54
8k
Code Review Best Practice
trishagee
74
19k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
71
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
100
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
110
The Curse of the Amulet
leimatthew05
1
7.6k
Mobile First: as difficult as doing things right
swwweet
225
10k
Practical Orchestrator
shlominoach
191
11k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
The Limits of Empathy - UXLibs8
cassininazir
1
200
Transcript
Vue.js Single File Components++ Meguro.es x Gontanda.js #1 2017-04-28 @kazupon
Who are you ?
Vue.js Core Team member https://github.com/kazupon
Introduction
• All in one file Single File Components .vue <HTML>
{CSS} ({JS}) Scoped CSS CSS Modules ES2015 in template
• Alternative language implementation Single File Components .vue
Single File Components • Include from HTML/CSS/JS Files .vue <HTML>
{CSS} ({JS})
Provide official some tools .vue vue-loader rollup-plugin-vue vueify bundling bundling
({JS})
So, Very useful!
Released new feature !! • In vue-loader v10.2, it was
published https://github.com/vuejs/vue-loader/commit/7d3e005d56781e8e5e4ae8f90212f782e4b3a509
And from v11.3 later • It become available used in
components! https://github.com/vuejs/vue-loader/commit/11cec30eb3925a144e1d484357b13c501d5fb3f9
Exciting feature!!
Custom Blocks
What’s Custom Blocks ? • Block of Single File Components
that defined with User. <blog> - - - title - - - bla bla bla … bla bla bla … </blog>
Custom Blocks Use cases • Documentation • Localization • Unit
Testing • Example playground • … etc
Documentation .vue .vue .vue .md vue-loader extract
Localization .vue ⚙ plugin vue-loader bundling ({JS}) hello run
Unit Testing .vue vue-loader bundling ({JS}) ✅ test1 : OK
✅ test2 : OK ❌ test3 : NG run
Example Playground .vue vue-loader bundling ({JS}) run playground runtime ⚙
Custom Blocks Real World
Localization with vue-i18n https://kazupon.github.io/vue-i18n/en/sfc.html message: hello world !!
Blog with ream (example) http://unvue-custom-block.surge.sh
vue-play (be planning) https://github.com/vue-play/vue-play/issues/5
DEMO
How to use
configure webpack conf
Available in Components • you need a custom loader
configure custom loader
Reference • vue-loader documentation https://vue-loader.vuejs.org
Conclusion
Conclusion • You can extend the single file components with
custom blocks • Depending on your idea, you can make your single file components even more useful !
One more thing …
Vue.js community for Japanese • You can join via Vue.js
official site http://jp.vuejs.org
genba.fm #1 • 2017/05 GW later, speak about Vue.js https://genba.fm
Thanks!