0

我需要在我的 Vue/Three.js 应用程序中处理 GLTF 和 HDR 文件。这不适用于 Vite。使用 Webpack,我可以在 Webpack 配置中进行设置

module.exports = {
  module: {
    rules: [
      {
        test: /\.(gltf)$/i,
        use: [
          {
            loader: 'url-loader',
          },
        ],
      },
    ],
  },
};

有没有办法在 Vite 中做同样的事情?

4

1 回答 1

1

Seems like Vite can handle this out of the box. The problem was the cors settings of the server the files were on.

于 2021-08-06T07:26:33.430 回答