You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
651 B
30 lines
651 B
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",
|
|
},
|
|
},
|
|
html: {
|
|
title: 'Meshtastic Web',
|
|
},
|
|
});
|
|
|