简体   繁体   中英

Failed to load resources (draco, basis)

I've been struggling issue with draco and basis loader.

I'm using webpack to build my project, and it's npm run build configuration looks like this:

const { merge } = require('webpack-merge')
const commonConfiguration = require('./webpack.common.js')
const { CleanWebpackPlugin } = require('clean-webpack-plugin')

module.exports = merge(
    commonConfiguration,
    {
        mode: 'production',
        plugins:
        [
            new CleanWebpackPlugin()
        ]
    }
)

Everything is fine, I'm using Live Server VSCode extension, but my resources aren't loading since this error: 在此处输入图像描述

The problem is, I have those in source project folder and also I had put it in my dist folder created by webpack to make sure it's not path fault. Well, it's not. 在此处输入图像描述

Neither of those are working. Thanks for help in advance.

Well, I managed to solve the issue. Remember to put whole path to folder where encoder/transcoder is placed. My problem was that I declaired the basis in the folder /basis/ , what is working in dev mode, but in production mode I had to declaire it as ./basis/ .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM