Hi, using the actual jmix version and node.js version…
I want to use some javascript in a view,
placed the .js file in src/main/resources/META-INF/resources/VAADIN
I tried different settings to get @JavaScript(“VAADIN/mapCapture.js”)
working in the view controller,
like adding this to the vite.config.js:
plugins: [vaadinPlugin()],
build: {
rollupOptions: {
external: [
‘/META-INF/resources/VAADIN/mapCapture.js’ // Add your JS file here
]
}
but I only get error messages on startup.
ReferenceError: vaadinPlugin is not defined … the .js is in the correct path and vite.config.ts is enhanced
or
ava.lang.IllegalStateException: com.vaadin.flow.server.ExecutionFailedException: Vite build exited with a non zero status
at com.vaadin.base.devserver.AbstractDevServerRunner.getCause(AbstractDevServerRunner.java:789) ~[vaadin-dev-server-24.7.5.jar:na]
Is there any step by step docu how to do that?
KR
Roland