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
500
カーナベル株式会社2024年2月 エンジニアイベント資料
andoshin11
0
290
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
The future of Nuxt.js with TypeScript
andoshin11
0
92
Other Decks in Technology
See All in Technology
PHPカンファレンス名古屋-テックリードの経験から学んだ設計の教訓
hayatokudou
2
310
地方拠点で エンジニアリングマネージャーってできるの? 〜地方という制約を楽しむオーナーシップとコミュニティ作り〜
1coin
1
230
「海外登壇」という 選択肢を与えるために 〜Gophers EX
logica0419
0
710
AndroidXR 開発ツールごとの できることできないこと
donabe3
0
130
関東Kaggler会LT: 人狼コンペとLLM量子化について
nejumi
3
590
ホワイトボードチャレンジ 説明&実行資料
ichimichi
0
130
ビジネスモデリング道場 目的と背景
masuda220
PRO
9
520
(機械学習システムでも) SLO から始める信頼性構築 - ゆる SRE#9 2025/02/21
daigo0927
0
120
現場で役立つAPIデザイン
nagix
33
12k
ユーザーストーリーマッピングから始めるアジャイルチームと並走するQA / Starting QA with User Story Mapping
katawara
0
210
Amazon S3 Tablesと外部分析基盤連携について / Amazon S3 Tables and External Data Analytics Platform
nttcom
0
130
一度 Expo の採用を断念したけど、 再度 Expo の導入を検討している話
ichiki1023
1
170
Featured
See All Featured
RailsConf 2023
tenderlove
29
1k
Six Lessons from altMBA
skipperchong
27
3.6k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
Bash Introduction
62gerente
611
210k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
A designer walks into a library…
pauljervisheath
205
24k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
12
960
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
630
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
Rails Girls Zürich Keynote
gr2m
94
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!