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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
andoshin11
December 11, 2019
Technology
1.4k
0
Share
Hack your Nuxt router!
Enhance your Nuxt application by extracting the router object and hacking it!
Here's how.
andoshin11
December 11, 2019
More Decks by andoshin11
See All by andoshin11
Introduction to gRPC Interceptors
andoshin11
0
98
カーナベルにおけるProtobuf二次利用例
andoshin11
0
160
Envoy External AuthZとgRPC Extensionを利用した「頑張らない」Microservices認証認可基盤
andoshin11
0
940
カーナベル株式会社2024年2月 エンジニアイベント資料
andoshin11
0
510
Private Cloudを支える最高のユーザーガイド運用技術
andoshin11
0
320
TS CompilerがVueを喋れても良いじゃないか
andoshin11
0
790
ain't giving up type-safe Express
andoshin11
2
490
Type Safe "Everything"
andoshin11
0
290
GatewayパターンとSchema駆動開発
andoshin11
7
1.5k
Other Decks in Technology
See All in Technology
データを"持てない"環境でのアノテーション基盤設計
sansantech
PRO
1
100
マルチエージェント × ハーネスエンジニアリング × GitLab Duo Agent Platformで実現する「AIエージェントに仕事をさせる時代へ。」 / 20260421 GitLab Duo Agent Platform
n11sh1
0
140
猫でもわかるKiro CLI(CDKコーディング編)
kentapapa
1
130
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
4.3k
QGISプラグイン CMChangeDetector
naokimuroki
1
360
The Journey of Box Building
tagomoris
4
1.2k
AzureのIaC管理からログ調査まで、随所に役立つSkillsとCustom-Instructions / Boosting IaC and Log Analysis with Skills
aeonpeople
0
200
ネットワーク運用を楽にするAWS DevOps Agent活用法!! / 20260421 Masaki Okuda
shift_evolve
PRO
2
200
20年前の「OSS革命」に学ぶ AI時代の生存戦略
samakada
0
330
"SQLは書けません"から始まる データドリブン
kubell_hr
2
470
マルチプロダクトの信頼性を効率良く保っていくために
kworkdev
PRO
0
140
20260423_執筆の工夫と裏側 技術書の企画から刊行まで / From the planning to the publication of technical book
nash_efp
3
370
Featured
See All Featured
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
750
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
270
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
310
BBQ
matthewcrist
89
10k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
150
Bash Introduction
62gerente
615
210k
Navigating Weather and Climate Data
rabernat
0
170
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
130
Navigating Team Friction
lara
192
16k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
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!