I'm currently developing a web-based application that can be used offline by other users on their local machines.
Within my NPM project, I am utilizing Potree-Core, which relies on THREE.js. However, the source code does not include an import for THREE, resulting in a
ReferanceError: THREE is not defined
crash.
If I manually insert import * as THREE from 'three'
into Potree-Core's source code, everything functions correctly. However, since other users will need to install the app using npm install
, Potree-Core will once again be installed without the necessary THREE
module.
I have been informed that it is possible to define global parameters in the project scope using package.json, but I have yet to find any useful information on how to do so.
Any assistance would be greatly appreciated.