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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
kazupon
April 28, 2017
Programming
1.8k
8
Share
Vue.js Single File Components++
meguro.es x gotanda.js #1
kazupon
April 28, 2017
More Decks by kazupon
See All by kazupon
Oxlint JS plugins
kazupon
1
1.3k
gunshi
kazupon
1
190
Nitro v3
kazupon
2
480
わたしのOSS活動
kazupon
3
600
Vapor Revolution
kazupon
3
4.1k
Vue.js最新動向
kazupon
3
1.6k
Vue 3.4
kazupon
13
4.8k
Vue & Vite Rustify
kazupon
4
2.5k
Vue.jsエコシステム動向2023
kazupon
17
9.1k
Other Decks in Programming
See All in Programming
AI時代のPhpStorm最新事情 #phpcon_odawara
yusuke
0
140
今年もTECHSCOREブログを書き続けます!
hiraoku101
0
230
VueエンジニアがReactを触って感じた_設計の違い
koukimiura
0
160
ネイティブアプリとWebフロントエンドのAPI通信ラッパーにおける共通化の勘所
suguruooki
0
250
PCOVから学ぶコードカバレッジ #phpcon_odawara
o0h
PRO
0
240
レガシーPHP転生 〜父がドメインエキスパートだったのでDDD+Claude Codeでチート開発します〜
panda_program
0
600
PHP でエミュレータを自作して Ubuntu を動かそう
m3m0r7
PRO
2
170
感情を設計する
ichimichi
5
1.3k
Radical Imagining - LIFT 2025-2027 Policy Agenda
lift1998
0
250
AIエージェントで業務改善してみた
taku271
0
500
PHPで TLSのプロトコルを実装してみる
higaki_program
0
740
実践CRDT
tamadeveloper
0
380
Featured
See All Featured
Tell your own story through comics
letsgokoyo
1
890
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
340
Java REST API Framework Comparison - PWX 2021
mraible
34
9.3k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.1k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
170
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
480
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
110k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
We Have a Design System, Now What?
morganepeng
55
8.1k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
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!