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.3k
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
カーナベルにおけるProtobuf二次利用例
andoshin11
0
90
Envoy External AuthZとgRPC Extensionを利用した「頑張らない」Microservices認証認可基盤
andoshin11
0
560
カーナベル株式会社2024年2月 エンジニアイベント資料
andoshin11
0
310
Private Cloudを支える最高のユーザーガイド運用技術
andoshin11
0
290
TS CompilerがVueを喋れても良いじゃないか
andoshin11
0
720
ain't giving up type-safe Express
andoshin11
2
430
Type Safe "Everything"
andoshin11
0
240
GatewayパターンとSchema駆動開発
andoshin11
7
1.4k
Catch up Nuxt.js 2019.02
andoshin11
0
2k
Other Decks in Technology
See All in Technology
「それはhowなんよ〜」のガイドライン #orestudy
77web
9
2.4k
入社後SREチームのミッションや課題の整理をした話
morix1500
1
240
Lakeflow Connectのご紹介
databricksjapan
0
100
SRE NEXT CfP チームが語る 聞きたくなるプロポーザルとは / Proposals by the SRE NEXT CfP Team that are sure to be accepted
chaspy
1
570
CBになったのでEKSのこともっと知ってもらいたい!
daitak
1
150
Vision Pro X Text to 3D Model ~How Swift and Generative Al Unlock a New Era of Spatial Computing~
igaryo0506
0
260
システムとの会話から生まれる先手のDevOps
kakehashi
PRO
0
210
All You Need Is Kusa 〜Slackデータで始めるデータドリブン〜
jonnojun
0
140
技術者はかっこいいものだ!!~キルラキルから学んだエンジニアの生き方~
masakiokuda
2
110
食べログが挑む!飲食店ネット予約システムで自動テスト無双して手動テストゼロを実現する戦略
hagevvashi
1
160
こんなデータマートは嫌だ。どんな? / waiwai-data-meetup-202504
shuntak
6
1.7k
ブラウザのレガシー・独自機能を愛でる-Firefoxの脆弱性4選- / Browser Crash Club #1
masatokinugawa
1
390
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
69
4.7k
Java REST API Framework Comparison - PWX 2021
mraible
30
8.5k
Into the Great Unknown - MozCon
thekraken
37
1.7k
Optimising Largest Contentful Paint
csswizardry
36
3.2k
Visualization
eitanlees
146
16k
How STYLIGHT went responsive
nonsquared
99
5.5k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
5
520
BBQ
matthewcrist
88
9.6k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
13
660
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
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!