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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Kusamao Abe
September 18, 2019
Programming
540
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
180
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
Oxlintのカスタムルールの現況
syumai
6
1k
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
3
620
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
200
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
18
6.3k
さぁV100、メモリをお食べ・・・
nilpe
0
130
JavaDoc 再入門
nagise
0
300
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
130
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
230
Oxcを導入して開発体験が向上した話
yug1224
4
290
Composerを使ったサプライチェーン攻撃の様子を眺めてみる #phpstudy
o0h
PRO
2
240
Claspは野良GASの夢をみるか
takter00
0
180
DynamoDBには集計系のクエリがないけどなんとかしたい
musan
1
130
Featured
See All Featured
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
220
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
360
The World Runs on Bad Software
bkeepers
PRO
72
12k
A Soul's Torment
seathinner
6
2.9k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
Being A Developer After 40
akosma
91
590k
A designer walks into a library…
pauljervisheath
211
24k
We Are The Robots
honzajavorek
0
240
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
300
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
250
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だけにしたほうが色々考えなくて済む気はする