Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Vue builds
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Kusamao Abe
September 18, 2019
Programming
560
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Vue builds
Kusamao Abe
September 18, 2019
Transcript
18 slides
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だけにしたほうが色々考えなくて済む気はする
More Decks by Kusamao Abe
See All by Kusamao Abe
Javascript in the past and now
kusamao
1
190
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
140
Using Heroku on entrusted development
kusamao
0
1.1k
Other Decks in Programming
See All in Programming
SODA - FACT BOOK(JP)
sodainc
1
40k
DroidKnights 2026 Android A2UI Jetpack Compose 기반의 안전한 AI UI 렌더링 - 박제창
itsmedreamwalker
1
250
祈るテストから、探索するテストへ 〜Lincheckではじめる並行処理テスト〜
yyh_gl
0
350
仕様駆動開発入門 (何を作るかを先に決めて渡す) | 目指せ Kiro マスター 05
inariku
PRO
3
210
エラーチャンネルのボールを拾い続けて鍛えるエンジニアの地力 / phpcon-niigata2026
meihei3
1
470
ローカルLLMの基本と近況 2611 / Local LLM basics and recent situation 2611
kishida
3
620
地方こそサーバーレス — 10年続けた、顔が見えるチームで確かな基盤を / Serverless Matters Most in Regional Areas — 10 Years of Building Reliable Foundations with Close-Knit Teams
seike460
PRO
2
500
Beyond Chatbots: Agentic UI with Open Standards @W-JAX 2026, München
manfredsteyer
PRO
0
120
クラウドゲーミングのパフォーマンス最適化に挑む / Cloud Gaming Performance Tuning
vivion
0
360
Crash Auto Pipelines
veronikapj
1
440
小さなアプリを作って公開するまで
onozaty
0
210
Claude Code ハーネスDeep Dive – 君はどこまで制御する? -
takateeen_knj
6
6.2k
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Building Applications with DynamoDB
mza
96
7.3k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
2
6.5k
Context Engineering - Making Every Token Count
addyosmani
9
1.3k
Google's AI Overviews - The New Search
badams
0
1.7k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.9k
Speed Design
sergeychernyshev
33
2.2k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
580
How Software Deployment tools have changed in the past 20 years
geshan
3
35k
Raft: Consensus for Rubyists
vanstee
143
7.9k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k