When trying to access files dynamically from a module ( by passing a list of filenames of local images in /assets/images to the module a-frame component ), the require function only seems to be able to find files in the modules own area ( eg /assets/images within the module itself ), rather than being able to look for files in eg the main projects /assets/images folder )
How can I access a project file from a module, when the filename of that local project file has been passed to the module.
This is for an image carasoul module, itβs used like thisβ¦
image-carousel="imagePath: ./assets/delorean/images/photos/; images: a.jpg bc.jpg def.jpg ghij.jpg"
β¦ where the images are stored in the projects folder, eg /assets/delorean/images/photos/a.jpg, and Iβm trying to get the filename using this code from within the module ( which fails, as it canβt find it ).
const nextImageURL = require(imagePath + imageList[i])
When I run the component locally ( rather than as a module ), everything works great. Iβd prefer to use modules, for sharing across projects etc.