Vite & Vaadin 23.2 Caching issue

We upgraded to Vaadin 23.2.6 shortly. As Webpack was deprecated, we switched to use Vite. In general Vite is working, but there is a very annoying problem.

When .js filles referred by the @JsModule annotation are modified, the the old state remains used for some strange reason even though the correct version is present in node_modules/@vaadin/flow-frontend.

I attached a screenshot to clarify this. The bottom browser window of the screenshot shows the content of the proposal.js file as present for the frontend. The upper browser window shows the content when querying the proposal.js file from the location shown by the browser tooltip.

I would have expected equal contents, but they differ. Lower window shows old content, so all my fixes applied to the JS file are ignored by the framework.

Anyone got an idea what’s causing this? To me it looks like some caching issue…

Could be related to

sounds equal to our problem, also multi-module project, i ll try the suggested exclusion in the vit.config.ts

deleting node_modules/.vite helps, but this ofc needs to be done after any change. Hoping for a vaadin-side fix of this bug.