I am currently working with Webpack 5 and attempting to provide a direct file path to my FBXLoader using the latest Webpack asset modules:
const loader = new FBXLoader()
loader.load('../assets/models/myModel.fbx', (object) => { ... }) // encountering error 404, file not found
Despite managing to import and load the file successfully, I am facing a persistent issue where the file consistently shows up as a 404 error. This occurs when I pass the path in line with what is mentioned above.
In my Webpack 5 configuration, I have implemented the following rule:
// Fbx - resolves import only for myFile from '../assets/models/myModel.fbx'
{
test: /\.fbx/,
type: 'asset/resource',
},