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

script to migrate to this plugin from a barebones vue router project #4

Open
posva opened this issue Jun 27, 2022 · 1 comment
Open
Labels
✨ feature request a new feature request

Comments

@posva
Copy link
Owner

posva commented Jun 27, 2022

Is it possible to create a small script that takes a routes array and move the files around? or is it too much work

Maybe, it's more interesting to generate the types from a file that exposes the routes array in js or ts and parse it

@posva posva moved this from 📋 Backlog to 🔖 Ready in unplugin-vue-router Jun 27, 2022
@posva posva added the ✨ feature request a new feature request label Feb 21, 2024
@posva
Copy link
Owner Author

posva commented Mar 7, 2024

I think it would make more sense to add an option to allow the plugin to read (parse with babel) from a router.ts file or routes.ts. The user would need to declare the routes with a macro defineTypedRoutes() that would get stripped out from the router file but would allow to read the path and names (when existing) from the routes array and create the files. The current implementation does require users to have most of the routes named. It could also rewrite the files to add names but this starts to become too much. I think it's better to require users to have all useful routes named (it's okay to have a route without component or components without a name)

@posva posva moved this from 🔖 Ready to 📋 Backlog in unplugin-vue-router May 27, 2024
zhangmo8 added a commit to zhangmo8/unplugin-vue-router that referenced this issue Aug 5, 2024
# This is the 1st commit message:

chore: resolve conflicts

# This is the commit message posva#2:

fix: fix the vue-loader error

# This is the commit message posva#3:

fix: setup return route

# This is the commit message posva#4:

fix: lint fix

# This is the commit message posva#5:

Update examples/webpack/shims-vue.d.ts

Co-authored-by: Eduardo San Martin Morote <posva@users.noreply.github.com>
# This is the commit message posva#6:

chore: update webpack deps & lock file

# This is the commit message posva#7:

chore: update webpack deps & lock file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feature request a new feature request
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant