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-cli 3.0時代のNuxt.js
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
andoshin11
March 27, 2018
Programming
3
6.1k
vue-cli 3.0時代のNuxt.js
vue-cli 3.0からプロジェクトのカスタマイズがtemplate方式からplugin方式に変わったので、Nuxt starter pluginを作りました
andoshin11
March 27, 2018
Tweet
Share
More Decks by andoshin11
See All by andoshin11
Introduction to gRPC Interceptors
andoshin11
0
79
カーナベルにおけるProtobuf二次利用例
andoshin11
0
160
Envoy External AuthZとgRPC Extensionを利用した「頑張らない」Microservices認証認可基盤
andoshin11
0
870
カーナベル株式会社2024年2月 エンジニアイベント資料
andoshin11
0
470
Private Cloudを支える最高のユーザーガイド運用技術
andoshin11
0
310
TS CompilerがVueを喋れても良いじゃないか
andoshin11
0
770
ain't giving up type-safe Express
andoshin11
2
470
Type Safe "Everything"
andoshin11
0
280
Hack your Nuxt router!
andoshin11
0
1.4k
Other Decks in Programming
See All in Programming
CSC307 Lecture 04
javiergs
PRO
0
650
ELYZA_Findy AI Engineering Summit登壇資料_AIコーディング時代に「ちゃんと」やること_toB LLMプロダクト開発舞台裏_20251216
elyza
2
1.4k
ThorVG Viewer In VS Code
nors
0
760
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
1.8k
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
640
GISエンジニアから見たLINKSデータ
nokonoko1203
0
200
Package Management Learnings from Homebrew
mikemcquaid
0
170
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
370
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
170
Implementation Patterns
denyspoltorak
0
270
Basic Architectures
denyspoltorak
0
650
Featured
See All Featured
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
400
Test your architecture with Archunit
thirion
1
2.1k
How to Ace a Technical Interview
jacobian
281
24k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
150
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Balancing Empowerment & Direction
lara
5
860
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
110
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
250
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.6k
Transcript
Nuxt Meetup #1 株式会社 merpay Software Engineer (Frontend) Shin Ando
(@andoshin11) vue-cli 3.0時代のNuxt.js
自己紹介 • Shin Ando (@andoshin11) • Software Engineer (Frontend) •
merpay, Inc (2018/3〜) • Skills • Vue.js • React Native • Rails
信用を創造して、なめらかな社会を創る
Vue conf Amsterdam参加してきました!!
vue-cli 3.0がやってくる!! • Plugin Based Architecture • Zero config by
default • Everything configurable without need for eject still in beta 6...
vue-cli 3.0がやってくる!! $ vue init <template> my-app $ vue create
my-app $ vue add <plugin> // add custom plugin Legacy way... Modern way (^3.0.0)
ところでみなさん... Nuxt、やっていますか?
ところでみなさん... Nuxt、どうやっていますか??
公式によると... https://nuxtjs.org/guide/installation
None
Pluginを作るぞ :muscle: https://github.com/vuejs/vue-cli/blob/dev/docs/plugin-dev.md
Pluginの作成: $ vue add されたときにgeneratorが実行される
Pluginの作成:/generator • /template 以下にプロジェクトにつっこみ たいファイルを用意する
Pluginの作成:/generator/index.js • /template 以下にプロジェクトにつっこみ たいファイルを用意する • index.jsでpackage.jsonを拡張
Pluginの作成:/generator/index.js • /template 以下にプロジェクトにつっこみ たいファイルを用意する • Index.jsでpackage.jsonを拡張 • index.js にtemplateの書き込み処理を記
述
Pluginの作成:/generator/index.js 元々 /src に存在したファイルは /src/legacy 以下に移動する(力技)
出来ました :clap: :clap: https://github.com/andoshin11/vue-cli-plugin-nuxt-starter-template
DEMO
ハマりどころ Babelのpreset指定しないと死ぬ (inside nuxt.config.js)
ハマりどころ Generator APIのhookが少ない。 除外リスト作成 ↓ /src にtemplate書き込み ↓ /src のファイルスキャン(postProcessFiles)
↓ 除外リストになければファイル移動 という4度手間に...
ハマりどころ 既存ファイルとの衝突
まとめ • vue-cli 3.0はいいぞ! • ボイラープレートはvue-cli。そこにNuxtをのっける • Nuxtの立ち位置が変化 「Vuexやvue-routerの設定まとめてやってくれる。ついでにSSRもできる」 ↓
「SSRのためのフレームワーク」
Thanks, and Happy Nuxt Life!! @andoshin11