refactor: add inline-schema
This commit is contained in:
+15
-7
@@ -16,13 +16,21 @@ export default defineConfig({
|
||||
plugins: [tailwindcss()],
|
||||
},
|
||||
},
|
||||
bundlerChain: (chain) => {
|
||||
// 为 .md 文件配置 raw-loader,支持 webpackContext 加载
|
||||
chain.module
|
||||
.rule('md-raw')
|
||||
.test(/\.md|\.yarn|\.csv$/)
|
||||
.type('asset/source');
|
||||
},
|
||||
rspack: {
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.schema\.csv$/,
|
||||
loader: 'inline-schema/csv-loader'
|
||||
},
|
||||
{
|
||||
test: /\.md|\.yarn|\.csv$/,
|
||||
exclude: /\.schema\.csv$/,
|
||||
type: 'asset/source'
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
html: {
|
||||
template: './src/index.html',
|
||||
|
||||
Reference in New Issue
Block a user