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
550
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
110
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
異なる設計思想のフレームワークを経験して得た学び
amekuhideki
2
1.5k
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
630
Seeing Through Serverless: Observability for AWS Lambda with ADOT and CloudWatch Application Signals
seike460
PRO
1
120
MIZARU@SPAJAM2026 第二回予選
1901drama
0
110
Pythonの実行はどこまで賢くなったのか? CPythonとPyPyから見る最適化のしくみ
curekoshimizu
4
2.8k
20260828_品質と開発生産性を両立させる、AI時代のE2Eテストの考え方
magicpod
0
160
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
3
470
이 함수, 실패하면 어떻게 되나요? null부터 Rich Errors까지, Kotlin 에러 처리 15년
haeti2
0
140
デプロイ直後のレイテンシスパイクを調べたら、 Railsの仕様にたどり着いた
nhsykym
0
110
Webエンジニアなのにブラウザの仕組みがわからないので、Pythonで自作してみた
tatsuki12
4
1.7k
Hello, Hiroshima Geospatial Data! — Exploring DoboX with Python
ra0kley
0
170
アクセシビリティから考える情報設計
high_g_engineer
0
170
Featured
See All Featured
Become a Pro
speakerdeck
PRO
31
6.2k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Claude Code のすすめ
schroneko
67
230k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
470
The Language of Interfaces
destraynor
162
27k
Color Theory Basics | Prateek | Gurzu
gurzu
0
460
Java REST API Framework Comparison - PWX 2021
mraible
34
9.7k
Designing Powerful Visuals for Engaging Learning
tmiket
1
530
Discover your Explorer Soul
emna__ayadi
2
1.3k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
260
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
590
Context Engineering - Making Every Token Count
addyosmani
9
1.1k
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だけにしたほうが色々考えなくて済む気はする