gridsome / gridsome/gridsome

Allows `alias` option on route definitions

Open
#1,010 1 comment 4 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
8.5k
Forks
466
PR merge metrics
No merged PRs in 30d

Description

## Summary

Vue router allows for `alias` property to assign an alias path the component can be accessed on.
It is currently not possible to pass this to `createPage` an error is thrown stating:

```
"alias" is not allowed
```

### Basic example

https://router.vuejs.org/guide/essentials/redirect-and-alias.html#alias

### Motivation

My immediate use case was to rehydrate the router on the client under a different URL (not a different base url but an entirely different url)

For example:

`/home` & `/homebase`

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating createPage and the route-option validation that rejects `alias`, then compare the accepted options with Vue Router's alias behavior. The work is done when route definitions can pass an `alias` path without the current validation error and the `/home` and `/homebase` example can resolve the component as described.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.