gltf-webpack-loader
This is a gltf webpack loader, tested on three.js. Automatically bundles all referenced files.
This loader will resolve all the files referenced in the .gltf file and change their urls depending on the loaders you have defined for these files. Files defined in the .gltf file must be relative to the .gltf file.
This loader still does not work with the public path. We dont have a idea how to solve that.
Usage
Webpack
const config = module: rules: test: /\.$/ use: loader: "gltf-webpack-loader" test: /\.$/ use: loader: 'file-loader' options: {}
Project
;; // file is being resolved by loader and a new url is returned.; const loader = ; // all files referenced in the gltf file have now also been resolved by your loaders.loader;