website/next.config.js

25 lines
717 B
JavaScript
Raw Normal View History

2024-04-21 17:07:06 +00:00
const path = require('path');
const createMDX = require('@next/mdx');
const childProcess = require('child_process');
2024-04-20 14:56:46 +00:00
2024-04-21 15:12:00 +00:00
const isProd = process.env.NODE_ENV === 'production';
2024-04-20 14:56:46 +00:00
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
reactStrictMode: true,
sassOptions: {
includePaths: [ path.join(__dirname, 'styles') ]
2024-04-21 15:12:00 +00:00
},
2024-04-21 17:07:06 +00:00
generateBuildId: async () => {
return childProcess.execSync('git rev-parse HEAD').toString().trim();
},
pageExtensions: [ 'js', 'jsx', 'md', 'mdx', 'ts', 'tsx' ],
2024-08-03 16:45:39 +00:00
assetPrefix: isProd ? 'http://localhost:3000/flint/website/pages' : undefined
2024-04-20 14:56:46 +00:00
};
2024-04-21 12:51:22 +00:00
module.exports = createMDX({
mdPlugins: [
import('rehype-highlight')
]
})(nextConfig);