Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Vue.js Single File Components++
Search
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
Nitro v3
kazupon
2
350
わたしのOSS活動
kazupon
3
550
Vapor Revolution
kazupon
3
3.9k
Vue.js最新動向
kazupon
3
1.6k
Vue 3.4
kazupon
13
4.7k
Vue & Vite Rustify
kazupon
4
2.4k
Vue.jsエコシステム動向2023
kazupon
17
8.1k
Reactivity Transform
kazupon
1
1.4k
わたしのOSS活動
kazupon
1
1.1k
Other Decks in Programming
See All in Programming
MAP, Jigsaw, Code Golf 振り返り会 by 関東Kaggler会|Jigsaw 15th Solution
hasibirok0
0
220
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
350
手軽に積ん読を増やすには?/読みたい本と付き合うには?
o0h
PRO
1
160
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
180
AIコードレビューがチームの"文脈"を 読めるようになるまで
marutaku
0
330
Herb to ReActionView: A New Foundation for the View Layer @ San Francisco Ruby Conference 2025
marcoroth
0
250
FluorTracer / RayTracingCamp11
kugimasa
0
200
Building AI Agents with TypeScript #TSKaigiHokuriku
izumin5210
6
1.2k
Socio-Technical Evolution: Growing an Architecture and Its Organization for Fast Flow
cer
PRO
0
300
ID管理機能開発の裏側 高速にSaaS連携を実現したチームのAI活用編
atzzcokek
0
200
全員アーキテクトで挑む、 巨大で高密度なドメインの紐解き方
agatan
8
19k
ViewファーストなRailsアプリ開発のたのしさ
sugiwe
0
410
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
69k
Writing Fast Ruby
sferik
630
62k
Site-Speed That Sticks
csswizardry
13
990
Embracing the Ebb and Flow
colly
88
4.9k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
How GitHub (no longer) Works
holman
316
140k
For a Future-Friendly Web
brad_frost
180
10k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.1k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
710
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
How to Think Like a Performance Engineer
csswizardry
28
2.3k
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!