Error in RGBELoader

Hi! im trying to load my hdr in promise function:

import { RGBELoader } from "three/examples/jsm/loaders/RGBELoader";

export default class Hdr {

    static load(src) {

        return new Promise(resolve => {

            const loader = new RGBELoader();

            loader.load(src, resolve, undefined, exception => {

                throw exception;





After that i use this function in promise.all:

const [envMap, gltf, texture] = await Promise.all([





Why i get this error?

Are you sure you are loading the HDR texture from the correct location? Can you please share interer.hdr in this topic?

Yes, location is correct.

My hdr:!AqtIFlFVWz4MhOArQw5nXe8JGYeODQ?e=106Vau

I’ve just replaced the texture in the official RGBELoader example and I can load it without issues.

Very strange situation. I use webpack and when i compile my project via dev config, all works fine. In production mode i get error.

What am i doing wrong?

Dev mode:!AqtIFlFVWz4MhOAs7OAa8PS3ytQrIg?e=9pdObD

Prod mode:!AqtIFlFVWz4MhOAtYSdi2ObdGa6fpw?e=BEV5DN

I think the problem in TerserJSPlugin …

Sorry, I’m not familiar with this plugin. I suggest you inspect the HTTP response headers and ensure that RGBELoader actually gets the data it expects.

The problem was the wrong HDR file name. First char of it was in uppercase lol. Excuse for troubling