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
1.4k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
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
800
ain't giving up type-safe Express
andoshin11
2
510
Type Safe "Everything"
andoshin11
0
300
GatewayパターンとSchema駆動開発
andoshin11
7
1.6k
Other Decks in Technology
See All in Technology
自分が詳しくない領域でAIを使う #プロヒス2026
konifar
13
5.2k
LayerX コーポレートエンジニアリング室におけるサプライチェーンセキュリティへの取り組み / Supply Chain Security at LayerX Corporate Engineering
yuyatakeyama
2
680
マルチアカウント環境での コーディングエージェントを使った障害調査が大変なので AIエージェントにReadOnly権限を付与してみた / ReadOnly AI Agents for Multi-Account AWS Incident Response
yamaguchitk333
2
110
GitHub Copilot app最速の発信の裏側
tomokusaba
1
190
iOS アプリの「これって不具合ですか?」を AI に調べてもらう
miichan
0
100
ぼっちではじめた登壇が「51名」「241件」の発信に化けた
subroh0508
1
240
iAEONの段階的リアーキテクト戦略 / iAEON's_Gradual_Re-architecture_Strategy
aeonpeople
0
230
AIネイティブな開発のサプライチェーンリスク対策 〜激動の開発現場でリスクに立ち向かう〜【ZennFes】
cscengineer
PRO
2
140
AIのReact習熟度を測る
uhyo
2
650
2026TECHFRESH畢業分享會 - 原生還是跨平台? App 開發踩坑實錄
line_developers_tw
PRO
0
1.3k
2026TECHFRESH畢業分享會 - Lightning Talk - 資料也要 CI/CD? 用 Airbyte 自動化資料同步
line_developers_tw
PRO
0
1.3k
入門!AWS Blocks
ysuzuki
1
160
Featured
See All Featured
The Cult of Friendly URLs
andyhume
79
6.9k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.5k
Navigating Team Friction
lara
192
16k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
780
Deep Space Network (abreviated)
tonyrice
0
210
A better future with KSS
kneath
240
18k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Making the Leap to Tech Lead
cromwellryan
135
9.9k
Utilizing Notion as your number one productivity tool
mfonobong
4
320
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
390
エンジニアに許された特別な時間の終わり
watany
107
250k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
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!