# Threejs / Vite / Blender GLB File - Not Loading

**URL:** <https://discourse.threejs.org/t/threejs-vite-blender-glb-file-not-loading/67419>\
**Category:** Questions\
**Tags:** vite, chrome, node-js, gltf-loader, loaders, glsl, materials, shaders\
**Created:** [June 28, 2024, 9:03am UTC](https://discourse.threejs.org/t/threejs-vite-blender-glb-file-not-loading/67419 "2024-06-28T09:03:32Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![webdingens](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/webdingens/32/49414_2.png) [@webdingens](https://discourse.threejs.org/u/webdingens)\
**Post date:** [July 2, 2024, 8:50am UTC](https://discourse.threejs.org/t/threejs-vite-blender-glb-file-not-loading/67419/13 "2024-07-02T08:50:23Z")

</div>

Change imports

```javascript
import vertexShader from './shaders/vertexShader.vert';
import fragmentShader from './shaders/fragmentShader.frag';
import glbFileUrl from './models/pow-mylar-grape-escape.glb';
import { DRACOLoader } from 'three/addons/loaders/DRACOLoader.js';

```

also rename the shader to use the appropriate extension, otherwise the plugin doesn’t compile it correctly.

Copy over Draco Decoder files to /public/draco from /node\_modules/three/examples/jsm/libs/draco

Replace the loading code:

```javascript
const loader = new GLTFLoader();
const dracoloader = new DRACOLoader();
dracoloader.setDecoderPath( '/draco/' );
loader.setDRACOLoader( dracoloader );

loader.load(glbFileUrl, (gltf) => {

```

add `assetsInclude` to `vite.config.mjs` if not already:

```javascript
export default defineConfig({
  plugins: [glsl()],
  assetsInclude: ["**/*.glb"],
})

```

Anything in /public/ you can use as simple string url ‘/file’. If it’s not in /public you have to import it, so it get’s bundled and/or copied over to the dist folder. Special file extensions will have to appear in `assetsInclude`. Also see [Vite Static Asset Handling](https://vitejs.dev/guide/assets#importing-asset-as-url)

---

_[View the full topic](https://discourse.threejs.org/t/threejs-vite-blender-glb-file-not-loading/67419)._
