generated from basementstudio/next-typescript
-
Notifications
You must be signed in to change notification settings - Fork 10
/
next.config.js
37 lines (35 loc) · 876 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
37
const withPlugins = require('next-compose-plugins')
const withBundleAnalyzer = require('@next/bundle-analyzer')
/**
* @type {import('next').NextConfig}
*/
const config = {
typescript: {
ignoreBuildErrors: true
},
reactStrictMode: false,
swcMinify: false,
webpack: (config) => {
config.resolve.fallback = { ...config.resolve.fallback, fs: false }
return config
},
images: {
domains: ['avatars.githubusercontent.com'],
formats: ['image/avif', 'image/webp']
},
experimental: { esmExternals: 'loose' },
async redirects() {
return [
{
source: '/experiments',
destination: '/',
permanent: true
}
]
},
transpilePackages: ['ogl', 'react-ogl', '@basementstudio/definitive-scroll']
}
module.exports = withPlugins(
[withBundleAnalyzer({ enabled: process.env.ANALYZE === 'true' })],
config
)