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 builds
Search
Kusamao Abe
September 18, 2019
Programming
540
1
Share
Vue builds
Kusamao Abe
September 18, 2019
More Decks by Kusamao Abe
See All by Kusamao Abe
Javascript in the past and now
kusamao
1
170
The Essence of UI Design
kusamao
1
2k
Make good (better) form
kusamao
0
270
Making mock-up in web application
kusamao
0
100
Keep a distance from jQuery
kusamao
0
130
Using Heroku on entrusted development
kusamao
0
1.1k
Other Decks in Programming
See All in Programming
AI時代の脳疲弊と向き合う ~言語学としてのPHP~
sakuraikotone
1
1.8k
Codex CLI でつくる、Issue から merge までの開発フロー
amata1219
0
330
YJITとZJITにはイカなる違いがあるのか?
nakiym
0
110
Rethinking API Platform Filters
vinceamstoutz
0
11k
脱 雰囲気実装!AgentCoreを良い感じにWEBアプリケーションに組み込むために
takuyay0ne
3
440
ファインチューニングせずメインコンペを解く方法
pokutuna
0
270
PCOVから学ぶコードカバレッジ #phpcon_odawara
o0h
PRO
0
230
How Swift's Type System Guides AI Agents
koher
0
180
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
340
Coding at the Speed of Thought: The New Era of Symfony Docker
dunglas
0
4.7k
煩雑なSkills管理をSoC(関心の分離)により解決する――関心を分離し、プロンプトを部品として育てるためのOSSを作った話 / Solving Complex Skills Management Through SoC (Separation of Concerns)
nrslib
3
740
一度始めたらやめられない開発効率向上術 / Findy あなたのdotfilesを教えて!
k0kubun
4
2.9k
Featured
See All Featured
Unsuck your backbone
ammeep
672
58k
The Pragmatic Product Professional
lauravandoore
37
7.2k
Faster Mobile Websites
deanohume
310
31k
How to make the Groovebox
asonas
2
2.1k
4 Signs Your Business is Dying
shpigford
187
22k
Navigating Weather and Climate Data
rabernat
0
160
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
110k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
290
Tell your own story through comics
letsgokoyo
1
890
Designing Experiences People Love
moore
143
24k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
340
Transcript
Vue.jsのビルドの種類 v-kansai Vue.js Nuxt.js Meetup #10 at tambourine commune 2019-09-18
はじめに:自己紹介 安部 草麻生 エンジニア/テクニカルディレクター
みなさんはVue.jsの環境って どう作ってますか?
環境の作り方 ・vue-cliを利用する ・手で一個ずつ $ npm install ・CDNを利用する
環境の作り方 ・webpackを使う ・browserifyなど、他の依存解決ツールを使う ・CDNを利用する
vue-cliを使っていると目にする Runtime + Compilerとは?
Runtime + Compiler https://jp.vuejs.org/v /guide/installation.html#さまざまなビルドについて
Runtime + Compiler Compiler テンプレート文字列をレンダリングするためのもの ・templateオプション ・elオプション に必須
Runtime + Compiler Runtime Compiler以外のコード群
Compilerが必要ない場面って?
Compilerが不要な場面 すべてVue Componentを利用できる場合 → 必要な情報はWeb APIなどから取得 → もしくはJSON形式でテンプレートに埋め込む → テンプレート自体に情報が埋め込まれない
Compilerが不要な場面 Runtime onlyビルドの場合、完全ビルドに比べて ファイルサイズは30%ほど軽量
ビルドに気をつけなきゃいけないとき
ビルドに気をつける import/requireでnpm経由のパッケージを 利用する場合、パスはそのパッケージの package.jsonのmainの項目を参照する Vueのmainは dist/vue.runtime.common.js
ビルドに気をつける Runtimeのみのビルドが利用されてしまうので、 Compilerが必要な場合に困る! → いやふつう気づくでしょ
ビルドに気をつける Componentのほうでうっかり手癖で const Vue = require(‘vue’); していると、なぜか動くところと動かないところが 混在することになる
ビルドに気をつける 2時間くらいああでもないこうでもない ってしてたんですよ Vue.set() とか使ってみたりして……
Runtimeだけにしたほうが色々考えなくて済む気はする