W
Wasp-lang•3mo ago
RichardHpa

Can I split up the main.wasp file into seperate files

Hey Everyone. I am really enjoying learning wasp and can easily see myself using this alot to make some of my web apps. I am just wondering is there anyway to split out the code in the main.wasp file into seperate files as I could easily see this file getting quite large and out of hand. What i mean is there a way to have a seperate file for all the routes (and maybe even break that until into sub routes), queries, jobs, actions, DB schemas. If not that would be a great thing for a future version of wasp to be able to do, would help with making the code abit more readable and manageable
5 Replies
Vinny (@Wasp)
Vinny (@Wasp)•3mo ago
YES this is coming in a future update but isn't possible at the moment 😦
matijash
matijash•3mo ago
100% agree! As @Vinny (@Wasp) mentioned, this is one of the features we'll be tackling next. It sounds straightforward, but it also opens the questions of (sub)modules, imports etc, so that's why we want to take enough time to refine this. Recent changes of v0.12 put the foundations for all this in place 🙂
RichardHpa
RichardHpa•3mo ago
amazing that great to hear, just doing some testing with opensaas is already making these files quite bloated
MEE6
MEE6•3mo ago
Wohooo @RichardHpa, you just became a Waspeteer level 1!