I am able to run tween perfectly in the editor by extending the tween.mjs library.
-Tried using the asset tween library from asset store (UMD), problem: wont define the tween library.
-Using tween.mjs module, works in editor, but I want to self host and publish, the mjs file is not packed with the whole build, cause the mjs not able to get reference to the engine on the hosted server due to import from “playcanvas”
Console error: Failed to import tween module: TypeError: Failed to resolve module specifier “playcanvas”. Relative references must start with either “/”, “./”, or “…/”.
-Cannot use playcanvas.mjs from npm build because this will cause 2 of different instance of engine to be reference and the result is not what i want, tween did not happen caused a bug.
-Can’t change the library to only .js cause it will cause a bug.
-Is there a way to just pack the build along with .mjs extension without having all this issue.