custon tsconfig.json
wasp version: 0.13.2
Hi! I want to change tsconfig.json, but it says I can’t for now.
I want to know if there is any manual way to change it. Thank you!
11 Replies
Hi @Turties. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Currently, Wasp doesn't support custom
tsconfig.json
configurations. The tsconfig.json
files in your project only affect IDE support and users don't have a way of configuring the TypeScript compiler for the server or the client source (https://github.com/wasp-lang/wasp/issues/835).
However, the Wasp team is aware of this limitation and there are open discussions on how to handle user modifications to the tsconfig.json
files. For instance, one suggestion is for Wasp to manage these files, checking if they exist, regenerating them if they don't, and fixing them if something is wrong source (https://github.com/wasp-lang/wasp/issues/939).
In the meantime, if you need to customize your project's build process, you can edit the vite.config.ts
file in your project root directory. Wasp will merge your config with the default Wasp's Vite config source (https://wasp-lang.dev/docs/project/custom-vite-config).
Please keep an eye on the relevant GitHub issues for updates on this feature.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Turties, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?@sodic jump on this when you can
@Turties What would you like to do specifically?
And hi to you too 🙂
I am trying to adopt emotionjs. And I think i need to configure tsconfig to make some attribute to be able to compile it.
sry for my bad english tho 🤣
Wohooo @Turties, you just became a Waspeteer level 1!
Hm, ok, interesting errors
Which properties would you like to add to
tsconfig.json
.
And no worries!I would like to try this one (from the internet) but have no idea where to begin. 😔
and this too!
Ok, yes, that's gonna be tricky
We'll have to hack a little to make it work
Try adding it to
.wasp/out/sdk/wasp/tsconfig.json
and .wasp/out/web-app/tsconfig.json
and see if it works then
Keep in mind, wasp can sometimes override these files, so it would be best to create a small script that does these edits for you
I can help out with that, but please confirm that adding those fields works first 🙂ok ill try and let you know. thanks!