Hi,
I am experiencing a problem that occurs only when compiling the project for production using the command
‘clean package -Pproduction’. Here are the details:
Development Environment: I am using Spring Tool Suite 4, version 4.21.1.
Project Configuration: The project uses Java 21 and Vaadin version 24.4.7.
I added the npm library ‘aframe’ using the annotation
‘@NpmPackage(value = “aframe”, version = “1.6.0”)’ and imported it into a Lit component.
This works fine in development.
However, I encounter an issue during the production build. When accessing the application (both on Chrome and Firefox), the app remains stuck in the loading state without ever completing, and the console does not show any errors.
The same issue occurs if I remove the @NpmPackage annotation and instead import the library directly in the index.html file using:
<script src="https://aframe.io/releases/1.6.0/aframe.min.js"></script>
Strangely, the same error occurs with the following libraries (used one at a time without aframe):
- three
- @photo-sphere-viewer/core
- panolens
Could you please provide guidance on how to resolve this issue?
Best regards