wasp-lang / wasp

The fastest way to develop full-stack web apps with React & Node.js.
https://wasp-lang.dev
MIT License
13.81k stars 1.19k forks source link

Vite reports valid error (routes) on `wasp start` start, but not on `wasp start` reload. #2333

Open Martinsos opened 1 month ago

Martinsos commented 1 month ago

This happened while I was testing TS SDK.

In main.wasp.ts, if you make one of default imports named import (e.g. for client), and then run wasp start, Vite reports error in the CLI, that import is invalid.

But, if I do that after I have already run wasp start, there is no error reported in the CLI, instead it all reloads as if all was ok.

How is that, is that expected behaviour? I would expect the same behaviour but maybe this is how our Vite is configured and there is a reason behind it? I should also confirm this is not TS SDK specific thing but I don't think it is.

@infomiho you might have some ideas.