ttrpg-tools/rsbuild.config.ts

48 lines
956 B
TypeScript
Raw Permalink Normal View History

2026-02-26 00:17:23 +08:00
import { defineConfig } from '@rsbuild/core';
2026-02-26 00:27:38 +08:00
import { pluginBabel } from '@rsbuild/plugin-babel';
2026-02-26 00:17:23 +08:00
import { pluginSolid } from '@rsbuild/plugin-solid';
2026-02-26 08:14:42 +08:00
import tailwindcss from '@tailwindcss/postcss';
2026-02-26 00:17:23 +08:00
export default defineConfig({
plugins: [
2026-02-26 00:27:38 +08:00
pluginBabel({
include: /\.(?:jsx|tsx)$/,
}),
2026-02-26 00:17:23 +08:00
pluginSolid(),
],
tools: {
2026-02-26 08:14:42 +08:00
postcss: {
postcssOptions: {
plugins: [tailwindcss()],
},
2026-02-26 00:17:23 +08:00
},
2026-03-31 15:40:06 +08:00
rspack: {
module: {
rules: [
{
test: /\.md|\.yarn|\.csv$/,
exclude: /\.schema\.csv$/,
type: 'asset/source'
},
]
}
}
2026-02-26 00:17:23 +08:00
},
html: {
template: './src/index.html',
},
source: {
entry: {
index: './src/main.tsx',
},
},
output: {
distPath: {
root: 'dist/web',
},
2026-04-08 19:56:44 +08:00
copy: process.env.NODE_ENV === 'development' ? [
{ from: './content', to: 'content' }
] : [],
2026-02-26 00:17:23 +08:00
},
});