Skip to content

feat(vue): add key and meta, and re-export createBeforeEachHandlers #244

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

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

zanmato
Copy link
Collaborator

@zanmato zanmato commented Apr 25, 2025

This adds key and meta to the route context, and re-exports the beforeEach routing handlers from $app/index to allow the developer to override these methods.
Also adds an i18n example (vue-i18n) that has both locale prefix and domain routing, by overriding the above methods and properties.

Checklist

Copy link

netlify bot commented Apr 25, 2025

Deploy Preview for agitated-mahavira-26f8f9 canceled.

Name Link
🔨 Latest commit e0a449b
🔍 Latest deploy log https://app.netlify.com/sites/agitated-mahavira-26f8f9/deploys/6814cbad332d9800089ccfcd

@zanmato
Copy link
Collaborator Author

zanmato commented Apr 25, 2025

@galvez I think this is a better approach, see the first commit for the changes to the vue package, and the second commit on how I've overridden the routing creation to enable i18n routing. The routing file is a bit verbose, but I don't think we could shorten it that much to be honest

@galvez galvez self-requested a review April 26, 2025 02:44
@galvez galvez self-assigned this Apr 29, 2025
zanmato added 2 commits May 2, 2025 15:39
This allows the developer to use their own key for the routeMap matching, as well as
provide meta data per route.
This also re-exports beforeEach handlers, so that they can be overridden in the virtual files.
This example overrides $app/index.js and provides new route creation as well as
beforeEach handlers to enable locale prefix and domain routing.
@zanmato zanmato force-pushed the feature-modular-i18n branch from 73ac965 to e0a449b Compare May 2, 2025 13:42
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.

2 participants