-
Notifications
You must be signed in to change notification settings - Fork 28
/
next.config.js
48 lines (45 loc) · 1.35 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
});
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
productionBrowserSourceMaps: true,
images: {
loader: 'custom',
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
deviceSizes: [640, 750, 828, 1080, 1200, 1920],
},
transpilePackages: ['next-image-export-optimizer'],
env: {
nextImageExportOptimizer_imageFolderPath: 'public/images',
nextImageExportOptimizer_exportFolderPath: 'out',
nextImageExportOptimizer_quality: '80',
nextImageExportOptimizer_storePicturesInWEBP: 'true',
nextImageExportOptimizer_exportFolderName: 'http-toolkit-assets',
nextImageExportOptimizer_generateAndUseBlurImages: 'true',
},
experimental: {
optimizePackageImports: ['@phosphor-icons/react', '@httptoolkit/accounts'],
},
compiler: {
styledComponents: true,
},
// Configure `pageExtensions` to include MDX files
pageExtensions: ['js', 'jsx', 'mdx', 'ts', 'tsx'],
trailingSlash: true,
webpack(config) {
config.module?.rules?.push({
// issuer: /\.[jt]sx?$/,
test: /\.svg$/i,
use: [
{
loader: '@svgr/webpack',
// options: { icons: true },
},
],
});
return config;
},
};
module.exports = withBundleAnalyzer(nextConfig);