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.2k
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
Envoy External AuthZとgRPC Extensionを利用した「頑張らない」Microservices認証認可基盤
andoshin11
0
460
カーナベル株式会社2024年2月 エンジニアイベント資料
andoshin11
0
270
Private Cloudを支える最高のユーザーガイド運用技術
andoshin11
0
280
TS CompilerがVueを喋れても良いじゃないか
andoshin11
0
700
ain't giving up type-safe Express
andoshin11
2
420
Type Safe "Everything"
andoshin11
0
230
GatewayパターンとSchema駆動開発
andoshin11
7
1.3k
Catch up Nuxt.js 2019.02
andoshin11
0
2k
The future of Nuxt.js with TypeScript
andoshin11
0
89
Other Decks in Technology
See All in Technology
あなたの知らないクラフトビールの世界
miura55
0
130
Evolving Architecture
rainerhahnekamp
3
250
dbtを中心にして組織のアジリティとガバナンスのトレードオンを考えてみた
gappy50
0
280
Git scrapingで始める継続的なデータ追跡 / Git Scraping
ohbarye
5
500
ABWGのRe:Cap!
hm5ug
1
120
Reactフレームワークプロダクトを モバイルアプリにして、もっと便利に。 ユーザに価値を届けよう。/React Framework with Capacitor
rdlabo
0
130
.NET 最新アップデート ~ AI とクラウド時代のアプリモダナイゼーション
chack411
0
200
Bring Your Own Container: When Containers Turn the Key to EDR Bypass/byoc-avtokyo2024
tkmru
0
860
三菱電機で社内コミュニティを立ち上げた話
kurebayashi
1
360
#TRG24 / David Cuartielles / Post Open Source
tarugoconf
0
580
JAWS-UG20250116_iOSアプリエンジニアがAWSreInventに行ってきた(真面目編)
totokit4
0
140
Accessibility Inspectorを活用した アプリのアクセシビリティ向上方法
hinakko
0
180
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
94
13k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
3
180
Unsuck your backbone
ammeep
669
57k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
How STYLIGHT went responsive
nonsquared
96
5.3k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Typedesign – Prime Four
hannesfritz
40
2.5k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.6k
Optimizing for Happiness
mojombo
376
70k
The Pragmatic Product Professional
lauravandoore
32
6.4k
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!