Files
blitzkit/packages/website/next.config.js
T
2024-09-06 21:45:58 -05:00

53 lines
1.1 KiB
JavaScript

import { createVanillaExtractPlugin } from '@vanilla-extract/next-plugin';
const withVanillaExtract = createVanillaExtractPlugin({ tests: /\.css$/ });
/** @type {import('next').NextConfig} */
const nextConfig = {
...withVanillaExtract({
webpack: (config, { isServer }) => {
config.module.rules.push(
{
test: /\.glsl$/,
type: 'asset/source',
},
{
test: /\.proto$/,
type: 'asset/source',
},
);
// if (isServer) {
// writeFileSync(
// 'public/assets/versions.json',
// JSON.stringify(
// readdirSync('docs/changelogs').map((file) =>
// file.replace('.md', ''),
// ),
// ),
// );
// }
return config;
},
}),
async headers() {
return [
{
source: '/(.*)?',
headers: [{ key: 'X-Frame-Options', value: 'DENY' }],
},
];
},
distDir: 'dist/website',
reactStrictMode: true,
experimental: {
workerThreads: false,
},
};
export default nextConfig;