I've stuck with js build... again. I am using thre...
# javascript
a
I've stuck with js build... again. I am using three-js library. And it is published in a complicated way so it has a main artifact and some additional modules that are part of npm distribution, but not parts of the main artifact. For example there is an
OrbitControls
module which just resides in
node_modules/three/examples/jsm/controls/OrbitControls.js
. On frontend plugin I just used a direct path to this module like
@file:JsModule("../../node_modules/three/examples/jsm/controls/OrbitControls.js")
. Now I can't use it since
node_modules
is no longer in build directory on
1.3.50
. Are there any suggestions?
s
@file:JsModule("three/examples/jsm/controls/OrbitControls.js")
should work. Did you try it?
a
I will try it. I remember that I tried it in old frontend build and for some reason It did not work.
I will get back to you as soon as I apply new build and check it.
🙏 1
Well, quick patch did not work. I got
Copy code
Execution failed for task ':threejs-wrapper:browserWebpack'.
> Cannot find node module "webpack/bin/webpack.js"
in the root project. So I will have to try it in the evening on my home computer.
I've finally managed to make the build work and your suggestion solves the problem.
I have not tried external project. But the test inside the library is passing