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
Hack your Nuxt router!
Search
andoshin11
December 11, 2019
Technology
0
1.4k
Hack your Nuxt router!
Enhance your Nuxt application by extracting the router object and hacking it!
Here's how.
andoshin11
December 11, 2019
Tweet
Share
More Decks by andoshin11
See All by andoshin11
Introduction to gRPC Interceptors
andoshin11
0
67
カーナベルにおけるProtobuf二次利用例
andoshin11
0
160
Envoy External AuthZとgRPC Extensionを利用した「頑張らない」Microservices認証認可基盤
andoshin11
0
840
カーナベル株式会社2024年2月 エンジニアイベント資料
andoshin11
0
440
Private Cloudを支える最高のユーザーガイド運用技術
andoshin11
0
300
TS CompilerがVueを喋れても良いじゃないか
andoshin11
0
760
ain't giving up type-safe Express
andoshin11
2
470
Type Safe "Everything"
andoshin11
0
270
GatewayパターンとSchema駆動開発
andoshin11
7
1.5k
Other Decks in Technology
See All in Technology
Java 25に至る道
skrb
3
130
善意の活動は、なぜ続かなくなるのか ーふりかえりが"構造を変える判断"になった半年間ー
matsukurou
0
190
スクラムを一度諦めたチームにアジャイルコーチが入ってどう変化したか
kyamashiro73
0
120
テストセンター受験、オンライン受験、どっちなんだい?
yama3133
0
200
国井さんにPurview の話を聞く会
sophiakunii
1
280
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
4
21k
ハッカソンから社内プロダクトへ AIエージェント ko☆shi 開発で学んだ4つの重要要素
leveragestech
0
540
BidiAgent と Nova 2 Sonic から考える音声 AI について
yama3133
2
140
プロンプトエンジニアリングを超えて:自由と統制のあいだでつくる Platform × Context Engineering
yuriemori
0
130
Claude Codeを使った情報整理術
knishioka
18
11k
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
3.6k
会社紹介資料 / Sansan Company Profile
sansan33
PRO
11
390k
Featured
See All Featured
Highjacked: Video Game Concept Design
rkendrick25
PRO
0
260
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
65
35k
HDC tutorial
michielstock
1
290
New Earth Scene 8
popppiees
0
1.3k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
140
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
0
390
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Done Done
chrislema
186
16k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
250
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
100
Raft: Consensus for Rubyists
vanstee
141
7.3k
Transcript
Hack your Nuxt router! @andoshin11 Sample Code :https://github.com/andoshin11/studio-andy/pull/119
Routing in Nuxt.js • Place a file inside the pages
directory • Instantly becomes a new route • Incredibly simple and easy! • However...
By extracting router object • Easier to overlook route-meta •
Easier to type-check • Easier to make a url-builder • Easier to generate breadcrumbs
Using router module @nuxtjs/router
Quick Setup! • Install router-module
Quick Setup! • Install router-module • Register the module
Quick Setup! • Install router-module • Register the module •
Create router file
Tips: migrate from default router Step 1 $ nuxt build
Step 2 router.js will be generated Step 3 Copy and paste contents
Override RouteMeta type def
Making url-builder (preparation) • First we need a route resolver
to retrieve the entire ancestors
Making url-builder
Generate Breadcrumbs
Generate Breadcrumbs
Generate Breadcrumbs
Generate Breadcrumbs
Thank you!