Hi there,
I’m using WP and I’m trying to install Three.js via NPM.
My package is well instaled in my node_modules folder, wich is in the root of my global WP folder.
When I try to call THREE in my js script: import THREE from “three”;
it’s telling me “import declarations may only appear at top level of a module”
I’m calling my js script in my footer:
I also have this same message when i call it from my footer.
I tought that it come from the fact that my scripts ws called before my module but think I don’t understand well the problem…
Can somewone help me to understand and solve my problem plzz ?