-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.ts
More file actions
43 lines (37 loc) · 1.2 KB
/
next.config.ts
File metadata and controls
43 lines (37 loc) · 1.2 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
import type { NextConfig } from 'next';
const nextConfig: NextConfig = {
output: 'export',
images: {
unoptimized: true,
},
sassOptions: {
includePaths: ['./src/static/css'],
silenceDeprecations: ['import'], // Silence @import deprecation warnings
},
basePath: process.env.NODE_ENV === 'production' ? '' : '',
assetPrefix: process.env.NODE_ENV === 'production' ? '' : '',
trailingSlash: true,
// Turbopack configuration
turbopack: {
// Define module resolution rules
rules: {},
// Module resolution extensions
resolveExtensions: ['.ts', '.tsx', '.js', '.jsx', '.json'],
},
// Experimental features
experimental: {
// Enable optimizations for packages
optimizePackageImports: ['@fortawesome/react-fontawesome', '@fortawesome/fontawesome-svg-core'],
},
};
// Only apply bundle analyzer when not using Turbopack
// This prevents the warning about Webpack being configured while Turbopack is not
if (process.env.TURBOPACK !== '1') {
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
});
module.exports = withBundleAnalyzer(nextConfig);
} else {
module.exports = nextConfig;
}
export default nextConfig;