-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathnext.config.js
More file actions
36 lines (32 loc) · 802 Bytes
/
next.config.js
File metadata and controls
36 lines (32 loc) · 802 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/** @type {import('next').NextConfig} */
const nextConfig = {};
module.exports = {
webpack: (
config,
{ buildId, dev, isServer, defaultLoaders, nextRuntime, webpack },
) => {
config.module.rules.push(
{
test: /\.(gltf)$/,
loader: "gltf-loader",
/**
* @type {import("gltf-loader").GLTFLoaderOptions}
*/
options: {
uriResolver: (module) => {
let result = module.default ?? module;
// Use the "src" property returned by the `next-image-loader` if present:
if (typeof result === "object" && "src" in result)
result = result.src;
return result;
},
},
},
{
test: /\.(bin)$/,
type: "asset/resource",
},
);
return config;
},
};