feat: changelogs

This commit is contained in:
TrèsAbhi committed 2024-06-06 20:09:02 -05:00
1 parent e8eb9333b1
commit e13d0c0e33
4 files changed
+44 -1

No files matched your search

+14 -1
View File
@@ -1,15 +1,28 @@
import { createVanillaExtractPlugin } from '@vanilla-extract/next-plugin';
import { readdirSync, writeFileSync } from 'fs';
const withVanillaExtract = createVanillaExtractPlugin({ tests: /\.css$/ });
/** @type {import('next').NextConfig} */
const nextConfig = {
...withVanillaExtract({
webpack: (config) => {
webpack: (config, { isServer }) => {
config.module.rules.push({
test: /\.glsl$/,
type: 'asset/source',
});
if (isServer) {
writeFileSync(
'public/assets/versions.json',
JSON.stringify(
readdirSync('docs/changelogs').map((file) =>
file.replace('.md', ''),
),
),
);
}
return config;
},
}),