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
カーナベルにおけるProtobuf二次利用例
andoshin11
0
71
Envoy External AuthZとgRPC Extensionを利用した「頑張らない」Microservices認証認可基盤
andoshin11
0
520
カーナベル株式会社2024年2月 エンジニアイベント資料
andoshin11
0
300
Private Cloudを支える最高のユーザーガイド運用技術
andoshin11
0
280
TS CompilerがVueを喋れても良いじゃないか
andoshin11
0
710
ain't giving up type-safe Express
andoshin11
2
420
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
Active Directory攻防
cryptopeg
PRO
8
5.5k
AWSではじめる Web APIテスト実践ガイド / A practical guide to testing Web APIs on AWS
yokawasa
8
720
NFV基盤のOpenStack更新 ~9世代バージョンアップへの挑戦~
vtj
0
360
依存パッケージの更新はコツコツが勝つコツ! / phpcon_nagoya2025
blue_goheimochi
3
220
Exadata Database Service on Cloud@Customer セキュリティ、ネットワーク、および管理について
oracle4engineer
PRO
2
1.5k
Visualize, Visualize, Visualize and rclone
tomoaki0705
9
83k
Cracking the Coding Interview 6th Edition
gdplabs
14
28k
エンジニアリング価値を黒字化する バリューベース戦略を用いた 技術戦略策定の道のり
kzkmaeda
6
2.8k
遷移の高速化 ヤフートップの試行錯誤
narirou
6
1.2k
自分だけの仮想クラスタを高速かつ効率的に作る kubefork
donkomura
0
100
大規模アジャイルフレームワークから学ぶエンジニアマネジメントの本質
staka121
PRO
3
1.2k
IoTシステム開発の複雑さを低減するための統合的アーキテクチャ
kentaro
1
120
Featured
See All Featured
KATA
mclloyd
29
14k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Typedesign – Prime Four
hannesfritz
40
2.5k
Embracing the Ebb and Flow
colly
84
4.6k
Measuring & Analyzing Core Web Vitals
bluesmoon
6
260
Visualization
eitanlees
146
15k
Git: the NoSQL Database
bkeepers
PRO
427
65k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
It's Worth the Effort
3n
184
28k
Raft: Consensus for Rubyists
vanstee
137
6.8k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
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!