-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
61 lines (53 loc) · 1.74 KB
/
next.config.js
File metadata and controls
61 lines (53 loc) · 1.74 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
const optimizedImages = require('next-optimized-images');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const createMdx = require('@next/mdx');
const nextConfig = {
webpack: (config) => {
config.module.rules.push({
test: /\.(glsl|vs|fs|vert|frag)$/,
exclude: /node_modules/,
use: [
'raw-loader',
'glslify-loader'
]
})
config.module.rules.push({
test: /\.(pdf)$/,
type: "asset/resource",
})
return config
},
output: 'export',
images: {
unoptimized: true
},
// images: {
// loader: "custom",
// // imageSizes: [16, 384],
// },
// transpilePackages: ["next-image-export-optimizer"],
// env: {
// nextImageExportOptimizer_imageFolderPath: "public/images",
// nextImageExportOptimizer_exportFolderPath: "out",
// nextImageExportOptimizer_quality: "75",
// nextImageExportOptimizer_storePicturesInWEBP: "true",
// nextImageExportOptimizer_exportFolderName: "nextImageExportOptimizer",
// // If you do not want to use blurry placeholder images, then you can set
// // nextImageExportOptimizer_generateAndUseBlurImages to false and pass
// // `placeholder="empty"` to all <ExportedImage> components.
// nextImageExportOptimizer_generateAndUseBlurImages: "true",
// // If you want to cache the remote images, you can set the time to live of the cache in seconds.
// // The default value is 0 seconds.
// nextImageExportOptimizer_remoteImageCacheTTL: "0",
// },
}
const withMDX = require('@next/mdx')({
extension: /\.mdx?$/,
options: {
// You can add MDX options here
}
});
module.exports = withMDX({
pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'md', 'mdx'],
...nextConfig,
});