-
Notifications
You must be signed in to change notification settings - Fork 203
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
Please support Vue.js #43
Comments
That's on the roadmap! |
👍 We definitely want to. I think there would be value in us looking at how statically analyzable apps generated using Vue CLI 3.0 are. We effectively need to support Vue parsing in https://github.com/guess-js/guess/tree/master/packages/parser. Some questions we can explore:
We might ask @yyx990803 his thoughts here sometime :) |
Vue Router route configurations are centralized and quite similar to that of Angular's (if the API hasn't changed that much) and should be quite easy to parse statically: const router = new VueRouter({
routes: [
{
path: '/',
component: () => import('./SomeComponent.vue'),
children: [
/* recursive from here */
]
}
]
}) I guess the potential edge cases would be:
|
@yyx990803 thanks for the response! Another potential problem I see is if the The Angular compiler solves this for us for free because it performs a partial evaluation of "foldable" expressions. A potential workaround that I see is using prepack. I haven't done an exhaustive research but my intuition tells me that if we're able to evaluate a subtree of the file's AST, we might be able to get the value of the Such approach should be even applicable to the first edge case you mentioned:
For the second edge case:
We currently map GA paths to routes by recognizing the routing parameters. There's still some testing left to make sure we're covering most edge cases but the general approach is clear. I'm curious, does Vue allows defining routes at runtime? If that's possible, we may need to change our approach a little. |
We have Nuxt support. With |
Vue.js is the one of popular framework please support
The text was updated successfully, but these errors were encountered: