How to use nodejs to generate routing files for vue projects

problem description

when developing a vue project, you need to add relevant configurations to the routing file each time you add a new page. Whether it can be implemented using node, enter new file name to automatically add the relevant JS to route.js . If so, which knowledge should I search

?

the environmental background of the problems and what methods you have tried

if you use writeFile to the original route.js file in string format, how to keep things like indentation so that exceptions can be maintained manually

Apr.02,2021

you can see how Baidu lavas is implemented

https://sourcegraph.com/githu.

Menu