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.5k
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
120
カーナベルにおけるProtobuf二次利用例
andoshin11
0
180
Envoy External AuthZとgRPC Extensionを利用した「頑張らない」Microservices認証認可基盤
andoshin11
0
1k
カーナベル株式会社2024年2月 エンジニアイベント資料
andoshin11
0
540
Private Cloudを支える最高のユーザーガイド運用技術
andoshin11
0
330
TS CompilerがVueを喋れても良いじゃないか
andoshin11
0
810
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時代の開発生産性は、個人技からチーム設計へ
moongift
PRO
2
190
貴方はどのエンジニアリングを磨くのか
hatyibei
0
130
DMM.com 購入改善推進チーム におけるCodeRabbitを用いた レビューフロー改善の一例
ysknsid25
2
620
LLMやAIエージェントをソフトウェアに組み込むプラクティス
shibuiwilliam
1
360
Amazon EVS で VCF 9.0 / 9.1 のサポート開始まとめ
mtoyoda
0
290
最適な自走を最小限の支援で — M&Aで拡大する組織で少人数SREが挑んだ1年 / SRE NEXT 2026
genda
0
1.1k
プロダクトだけじゃない、社内プロセスにおける自動化・省力化ノススメ
kakehashi
PRO
1
3.6k
AIと共生する開発者プラットフォーム:バクラクのモノレポ×マイクロサービス基盤
sakajunquality
2
3.4k
シンガポールで登壇してきます
yama3133
0
100
SRE本の知られざる名シーン / The Hidden Gems of Google SRE Book
nari_ex
1
370
ruby.wasmとPicoRuby.wasmに対応した仮想DOMライブラリを作ってる話 #kaigieffect_kaigi
sue445
PRO
0
140
クラウド上のデータ復旧で見落としがちな制約: 医療系 SaaS の BCP 設計から得た教訓
kakehashi
PRO
0
3.4k
Featured
See All Featured
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
67
56k
Code Review Best Practice
trishagee
74
20k
Side Projects
sachag
455
43k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.7k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
460
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.2k
Are puppies a ranking factor?
jonoalderson
1
3.7k
Marketing to machines
jonoalderson
1
5.6k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.7k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
310
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!