Open arafat1023 opened 4 years ago
Any fix?
I did not use this plugin.Later i used threejs.I had to change my file loader configuration in my nextjs project. To serve assets correctly with file-loader, configure correct location of _next static dir as following:
{
loader: 'file-loader',
options: {
publicPath: "/_next/static/images", // the path access the assets via url
outputPath: "static/images/", // where to store on disk
}
}
webpack: (config) => {
config.module.rules.push({
test: /\.(glb|gltf|obj)$/,
use: {
loader: 'file-loader',
options: {
publicPath: "/_next/static/images",
outputPath: "static/images/",
}
},
});
and try to import the the file like this:
import test2 from "../../../static/images/filename.gltf";
I dont know it will work for you or not
I am trying to show a .obj file.
I am gettting this error