move to RsBuild

This commit is contained in:
Sacha Weatherstone
2024-10-06 21:24:12 +10:00
parent 62f8c4509e
commit 42068ad3d8
90 changed files with 552 additions and 758 deletions
+27
View File
@@ -0,0 +1,27 @@
import { defineConfig } from "@rsbuild/core";
import { pluginReact } from "@rsbuild/plugin-react";
import { execSync } from "node:child_process";
let hash = "";
try {
hash = execSync("git rev-parse --short HEAD").toString().trim();
} catch (error) {
hash = "DEV";
}
export default defineConfig({
plugins: [pluginReact()],
source: {
define: {
"process.env.COMMIT_HASH": JSON.stringify(hash),
},
alias: {
"@app": "./src",
"@pages": "./src/pages",
"@components": "./src/components",
"@core": "./src/core",
"@layouts": "./src/layouts",
},
},
});