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
andoshin11
March 27, 2018
Programming
6.2k
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
vue-cli 3.0時代のNuxt.js
vue-cli 3.0からプロジェクトのカスタマイズがtemplate方式からplugin方式に変わったので、Nuxt starter pluginを作りました
andoshin11
March 27, 2018
More Decks by andoshin11
See All by andoshin11
Introduction to gRPC Interceptors
andoshin11
0
110
カーナベルにおけるProtobuf二次利用例
andoshin11
0
170
Envoy External AuthZとgRPC Extensionを利用した「頑張らない」Microservices認証認可基盤
andoshin11
0
990
カーナベル株式会社2024年2月 エンジニアイベント資料
andoshin11
0
530
Private Cloudを支える最高のユーザーガイド運用技術
andoshin11
0
320
TS CompilerがVueを喋れても良いじゃないか
andoshin11
0
810
ain't giving up type-safe Express
andoshin11
2
510
Type Safe "Everything"
andoshin11
0
300
Hack your Nuxt router!
andoshin11
0
1.4k
Other Decks in Programming
See All in Programming
AI 輔助遺留系統現代化的經驗分享
jame2408
1
1.1k
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
12
4.5k
エージェンティックRAGにAWSで入門しよう!
har1101
9
1.8k
Hatena Engineer Seminar #37「言語モデルの活用に関する研究」
slashnephy
0
410
Contextとはなにか
chiroruxx
1
380
さぁV100、メモリをお食べ・・・
nilpe
0
160
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
360k
スマートグラスで並列バイブコーディング
hyshu
0
270
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
180
Strategic Design in the Frontend: Moduliths & Micro Frontends @DDDEurope
manfredsteyer
PRO
0
130
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
21
7.1k
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
430
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
Being A Developer After 40
akosma
91
590k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
760
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.3k
Producing Creativity
orderedlist
PRO
348
40k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
340
My Coaching Mixtape
mlcsv
0
160
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
260
Practical Orchestrator
shlominoach
191
11k
Bash Introduction
62gerente
615
220k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
790
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
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