parent
919afcbcfc
commit
e754e40622
22 changed files with 1034 additions and 184 deletions
26
packages/website/vite.config.ts
Normal file
26
packages/website/vite.config.ts
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import { defineConfig } from "vite";
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
// Custom plugin to load markdown files
|
||||
{
|
||||
name: "markdown-loader",
|
||||
transform(code, id) {
|
||||
if (id.slice(-3) === ".md") {
|
||||
// For .md files, get the raw content
|
||||
return `export default ${JSON.stringify(code)};`;
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "html-loader",
|
||||
transform(code, id) {
|
||||
if (id.slice(-5) === ".html") {
|
||||
// For .md files, get the raw content
|
||||
return `export default ${JSON.stringify(code)};`;
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue