ttrpg-tools/rsbuild.config.ts

52 lines
1.0 KiB
TypeScript
Raw 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: /\.schema\.csv$/,
2026-03-31 16:20:42 +08:00
loader: 'inline-schema/csv-loader',
options: {
writeToDisk: true
}
2026-03-31 15:40:06 +08:00
},
{
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',
},
},
});