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$/,
|
|
|
|
|
loader: 'inline-schema/csv-loader'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
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-02-26 00:40:11 +08:00
|
|
|
copy: [
|
|
|
|
|
{ from: './content', to: 'content' },
|
|
|
|
|
],
|
2026-02-26 00:17:23 +08:00
|
|
|
},
|
|
|
|
|
});
|