-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
36 lines (32 loc) · 928 Bytes
/
next.config.js
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
const withPlugins = require('next-compose-plugins');
const withOptimizedImages = require('next-optimized-images');
const withTM = require('next-transpile-modules')(['three']);
/**
* @type {import('next').NextConfig}
*/
const nextConfig = {
// ? https://github.com/vercel/next.js/issues/7755#issuecomment-812805708
webpack: (config, { isServer }) => {
if (!isServer) {
config.resolve.fallback.fs = false;
}
config.module.rules.push({
test: /\.(glsl|vs|fs|vert|frag)$/,
use: ['raw-loader', 'glslify-loader'],
});
return config;
},
// ? https://nextjs.org/docs/advanced-features/compiler#why-swc
swcMinify: false,
// ? https://nextjs.org/docs/advanced-features/output-file-tracing#automatically-copying-traced-files
output: 'standalone',
};
module.exports = withPlugins(
[
withTM(),
withOptimizedImages({
optimizeImages: false,
}),
],
nextConfig
);