feat(infra): migrate to rsbuild

This commit is contained in:
deytenit committed 2026-02-12 23:39:20 +03:00
1 parent 97c6347f2e
commit 4628c043ce
95 files changed
+5582 -11282

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
import React from 'react';
import * as TestArticle from './articles/2026/test-article.mdx';
export interface Article {
slug: string;
title: string;
description?: string;
createdDate: Date;
updatedDate?: Date;
tags?: string[];
image?: string;
Component: React.ComponentType<{ components?: Record<string, React.ComponentType<any>> }>;
}
function register(module: any, slug: string): Article {
const { frontmatter, default: Component } = module;
return {
slug,
title: frontmatter.title,
description: frontmatter.description,
createdDate: new Date(frontmatter.createdDate),
updatedDate: frontmatter.updatedDate ? new Date(frontmatter.updatedDate) : undefined,
tags: frontmatter.tags,
image: frontmatter.image,
Component,
};
}
export const articles: Record<string, Article> = {
'test-article': register(TestArticle, '2026/test-article'),
};
export const sortedArticles = Object.values(articles).sort(
(a, b) => b.createdDate.getTime() - a.createdDate.getTime()
);