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
85
カーナベルにおけるProtobuf二次利用例
andoshin11
0
160
Envoy External AuthZとgRPC Extensionを利用した「頑張らない」Microservices認証認可基盤
andoshin11
0
920
カーナベル株式会社2024年2月 エンジニアイベント資料
andoshin11
0
500
Private Cloudを支える最高のユーザーガイド運用技術
andoshin11
0
310
TS CompilerがVueを喋れても良いじゃないか
andoshin11
0
780
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
大規模ECサイトのあるバッチのパフォーマンスを改善するために僕たちのチームがしてきたこと
panda_program
1
260
モジュラモノリス導入から4年間の総括:アーキテクチャと組織の相互作用について / Architecture and Organizational Interaction
nazonohito51
3
800
2026-03-11 JAWS-UG 茨城 #12 改めてALBを便利に使う
masasuzu
2
410
コンテキスト・ハーネスエンジニアリングの現在
hirosatogamo
PRO
6
600
Go標準パッケージのI/O処理をながめる
matumoto
0
240
猫でもわかるKiro CLI(AI 駆動開発への道編)
kentapapa
0
270
AI時代の「本当の」ハイブリッドクラウド — エージェントが実現した、あの頃の夢
ebibibi
0
150
1GB RAMのラズピッピで何ができるのか試してみよう / 20260319-rpijam-1gb-rpi-whats-possible
akkiesoft
0
580
新規事業×QAの挑戦:不確実性を乗りこなす!フェーズごとに求められるQAの役割変革
hacomono
PRO
0
130
AlloyDB 奮闘記
hatappi
0
170
ソフトバンク流!プラットフォームエンジニアリング実現へのアプローチ
sbtechnight
1
220
品質を経営にどう語るか #jassttokyo / Communicating the Strategic Value of Quality to Executive Leadership
kyonmm
PRO
2
780
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.5k
Mobile First: as difficult as doing things right
swwweet
225
10k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
340
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
210
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
320
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
61
43k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
420
Marketing to machines
jonoalderson
1
5k
A better future with KSS
kneath
240
18k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
780
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!