Closed ferretwithaberet closed 5 months ago
@ferretwithaberet Thanks for opening the PR.
I've commented on the original issue, disabling the router.ts
generation can be acheived easily by skipping the plugin usage at the vite.config.js
— the exports can be used instead directly from react-router-dom
. It's not recommended as you still can benefit from the generated types in JavaScript project with jsconfig.json
or specific editor integration.
Removing the types from the file generated specifically for types would be unnecessary option.
Hope you find that helpful, thanks!
Description Add
transpile
option to transpile the code inside of generatedrouter.ts
to ESNext javascript code.Motivation Fixes #156, as this will allow the generouted plugin to be used in vanilla javascript codebases. This feature is meant to be used in combination with the
output
option to generate arouter.js
file.