vue-route-generator
vue-route-generator copied to clipboard
Allow scripted <route-meta/>
Currently, <route-meta>
is JSON, but it would be nice if it could script it so it runs once:
<route-meta>
import { title } from "./route-meta";
export default {
title,
tabTitle: "My Custom Tab",
}
</route-meta>
export const title = "My title";
Sounds good to me. Although the implementation will be much more complicated as we need to analyse JS code and resolve each import statement.
It would also be nice to have support for redirect
in the route meta or a way to define redirect for page routes
Hey @nonsocode,
Redirect already works in the route meta from my testing...
<route>
{
"name": "home",
"redirect": "/campaigns"
}
</route>
@ktsn I need this too... I think we can just use webpack to do the hard work, are you ok for receiving a PR for this?