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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
80
カーナベルにおけるProtobuf二次利用例
andoshin11
0
160
Envoy External AuthZとgRPC Extensionを利用した「頑張らない」Microservices認証認可基盤
andoshin11
0
880
カーナベル株式会社2024年2月 エンジニアイベント資料
andoshin11
0
480
Private Cloudを支える最高のユーザーガイド運用技術
andoshin11
0
310
TS CompilerがVueを喋れても良いじゃないか
andoshin11
0
770
ain't giving up type-safe Express
andoshin11
2
480
Type Safe "Everything"
andoshin11
0
280
GatewayパターンとSchema駆動開発
andoshin11
7
1.5k
Other Decks in Technology
See All in Technology
AI駆動開発を事業のコアに置く
tasukuonizawa
1
210
茨城の思い出を振り返る ~CDKのセキュリティを添えて~ / 20260201 Mitsutoshi Matsuo
shift_evolve
PRO
1
310
Context Engineeringが企業で不可欠になる理由
hirosatogamo
PRO
3
600
30万人の同時アクセスに耐えたい!新サービスの盤石なリリースを支える負荷試験 / SRE Kaigi 2026
genda
4
1.3k
StrandsとNeptuneを使ってナレッジグラフを構築する
yakumo
1
120
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
3.9k
Bedrock PolicyでAmazon Bedrock Guardrails利用を強制してみた
yuu551
0
240
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.4k
【Oracle Cloud ウェビナー】[Oracle AI Database + AWS] Oracle Database@AWSで広がるクラウドの新たな選択肢とAI時代のデータ戦略
oracle4engineer
PRO
2
160
Codex 5.3 と Opus 4.6 にコーポレートサイトを作らせてみた / Codex 5.3 vs Opus 4.6
ama_ch
0
160
顧客の言葉を、そのまま信じない勇気
yamatai1212
1
360
Cosmos World Foundation Model Platform for Physical AI
takmin
0
920
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.9k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
76
Testing 201, or: Great Expectations
jmmastey
46
8k
Site-Speed That Sticks
csswizardry
13
1.1k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
RailsConf 2023
tenderlove
30
1.3k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
140
GitHub's CSS Performance
jonrohan
1032
470k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
430
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Embracing the Ebb and Flow
colly
88
5k
Why Our Code Smells
bkeepers
PRO
340
58k
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!