Webby Vanderhack
Webby Vanderhack
WWasp
Created by Webby Vanderhack on 4/4/2025 in #đŸ™‹questions
Is it possible to dynamically import a static client asset from the server?
Let's say I have a ts/js file that exports some JSON that I would like a server query/action to have access to, but I want to pass the file name to the query/action. Currently I have query code like this:
const getContractABI: GetContractABI = async ({address}, context) => {
const {default: contract} = await import(`contracts/${address}.js`);

return contract.abi;
};
const getContractABI: GetContractABI = async ({address}, context) => {
const {default: contract} = await import(`contracts/${address}.js`);

return contract.abi;
};
Where would I put that ts/js file and is it even possible to do what I'm trying here?
18 replies
WWasp
Created by Webby Vanderhack on 3/29/2025 in #đŸ™‹questions
Should migration.sql files be checked in to git?
I'm not sure if these should be ignored or checked in.
6 replies
WWasp
Created by Webby Vanderhack on 3/29/2025 in #đŸ™‹questions
Refresh problem
another new person question: Wasp doesn't appear to be re-compiling when I make changes to frontend source. Still following the ToDo App tutorial and I just replaced the entire contents of MainPage.tsx to go from a single <p>Hello world!</p> element to rendering a list of tasks, but my terminal where wasp start is running never changed and refreshing the page doesn't show my list. If I kill the wasp process and do wasp start again, everything is fine. I do see in the terminal output that nodemon is watching these extensions: ts,mts,js,mjs,json but not tsx (and also jsx). Could that be causing this or do I need to look at something else?
6 replies
WWasp
Created by Webby Vanderhack on 3/28/2025 in #đŸ™‹questions
Is it possible to configure Wasp to use a different package manager?
Wasp uses npm when creating a new project (I just made my first one following the Quick Start page) and I was wondering if it is possible to use yarn instead?
5 replies