Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(extendRoutes): allow relative path overrides #519

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

robertmoura
Copy link

@robertmoura robertmoura commented Oct 4, 2024

BREAKING CHANGE: allow relative path overrides

Closes #341

  • Support relative paths for EditableTreeNode
  • Require absolute paths at the base of the tree and the root's children
  • Support relative paths in definePage and <route> block

Includes changes from #431

Description

Relative paths in definePage and route block

Relative paths are converted to absolute paths. Here is an example:

src/pages/
├─ custom-root.vue
├─ layout.vue
└─ layout/
	└─ empty-folder/
		└─ custom-child.vue

custom-root.vue

// Absolute path is '/i-am-custom'
definePage({
    path: 'i-am-custom',
});

custom-child.vue

// Absolute path is '/layout/i-am-custom'
definePage({
    path: 'i-am-custom',
});

Copy link

codecov bot commented Oct 5, 2024

Codecov Report

Attention: Patch coverage is 64.00000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 68.15%. Comparing base (5741b2a) to head (a930a2d).

Files with missing lines Patch % Lines
src/core/context.ts 35.71% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #519      +/-   ##
==========================================
+ Coverage   67.56%   68.15%   +0.59%     
==========================================
  Files          31       31              
  Lines        3074     3084      +10     
  Branches      601      611      +10     
==========================================
+ Hits         2077     2102      +25     
+ Misses        991      976      -15     
  Partials        6        6              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support non absolute paths in EditableTreeNode
1 participant