-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
kit-routes: add exportConsts config option #775
kit-routes: add exportConsts config option #775
Conversation
…ed-dotenv-service-worker - for reserved usernames, we modify the lib/ROUTES.ts that's kept up to date by kit-routes, exporting the various consts it generates (only the types are exported, and we need runtime checks here...). I patched vite-plugin-kit-routes right now, we'll wait to see if jycouet/kitql#775 is merged
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 50a56e3. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
@all-contributors please add @ewen-lbh for code |
I've put up a pull request to add @ewen-lbh! 🎉 |
🙏 thx for the contribution. Can you try |
just upgraded, it works fine ^^ also sorry, i just realized, i probably should've named the option in snake_case rather than camelCase... oh well |
Well well, your touch is in at least ;) |
omg about to setup a AT protocol for my own domain just to reply lmao (also i really gotta update my github username) |
Hi!
We're using kit-routes in our app and it works great!
However, we have users that can choose the username, and get the profile page on
/username
. Thus, we want to disallow usernames that conflict with existing routes, so that their profile page is not inaccessible because they chose e.g. "settings" as a usernamekit-routes actually generates the strings we need for this! unfortunately, they're not exported...
right now I'm using a yarn patch to get them, but having it in the config will certainly be better ^^
So this PR adds the
exportConsts
option that decides whether to exportPAGES
, etc. or not