Vite/Rollup build error after upgrading to 24.1.8

Not sure why this would be the problem though. It looks like its creating chunks with imports inside a function, which is definitely invalid JS

@quirky-zebra Unfortunately, reverting to old code didn’t fix the problem

Damn… did you upgrade from 24.1.7 or earlier?

From 24.1.7

https://github.com/vaadin/flow/pull/17522 was in between 24.1.7->8 as well

Tried reverting it too

Hopefully Gradle is using my classpath overrides

:confused: not good… those are the only things that come to mind… @sanguine-whale do you happen to know something else that could have caused this regression?

Tried running Vite manually (./node_modules/vite/bin/vite.js build). Same error.

Just in case: you don’t use nodejs 20.6?

18.17.1

Good :grimacing: just wanted to rule out anything

I dont understand why chunks would output this way

Shouldn’t they all be in the format:

// imports
// injectGlobalCss

https://github.com/vaadin/flow/issues/17573

Looks like a broken JS code generator somewhere, indeed the above JS looks incorrect. Let me check the updates between 24.1.7 and 24.1.8

@astonishing-kookaburra could you please try to use Vaadin 24.1.8 with Flow 24.1.9 ?

So you need

com.vaadin flow-bom 24.1.9 pom import com.vaadin vaadin-bom ${vaadin.version} pom import

OMG, I think I found the error.