fix: improve production build process and remove unused imports
Some checks failed
Code quality checks / biome (push) Failing after 14s
Some checks failed
Code quality checks / biome (push) Failing after 14s
This commit is contained in:
parent
a8a4031437
commit
ed89311c3f
3 changed files with 6 additions and 2 deletions
|
@ -11,6 +11,7 @@ const build = async () => {
|
||||||
sourcemap: "linked",
|
sourcemap: "linked",
|
||||||
splitting: true,
|
splitting: true,
|
||||||
publicPath: "/assets/",
|
publicPath: "/assets/",
|
||||||
|
drop: (development ? [] : ["console", "debugger"]),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ import "mdui/components/button-icon";
|
||||||
import "@mdui/icons/person--outlined";
|
import "@mdui/icons/person--outlined";
|
||||||
import "@mdui/icons/person--rounded";
|
import "@mdui/icons/person--rounded";
|
||||||
|
|
||||||
import "@mdui/icons/more-vert--rounded";
|
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -3,13 +3,17 @@ import { file, gc, serve } from "bun";
|
||||||
import pkg from "../package.json";
|
import pkg from "../package.json";
|
||||||
import Backend from "./back";
|
import Backend from "./back";
|
||||||
|
|
||||||
|
if (!Backend.development) {
|
||||||
|
process.env.NODE_ENV = "PRODUCTION";
|
||||||
|
}
|
||||||
|
|
||||||
let heartrate = 0;
|
let heartrate = 0;
|
||||||
let lanyard: LanyardData = {
|
let lanyard: LanyardData = {
|
||||||
discord_status: "online",
|
discord_status: "online",
|
||||||
activities: [],
|
activities: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
await fs.rm("./dist", { recursive: true, force: true }).catch(() => {});
|
await fs.rm("./dist", { recursive: true, force: true }).catch(() => { });
|
||||||
|
|
||||||
if (!Backend.development) {
|
if (!Backend.development) {
|
||||||
await Backend.build();
|
await Backend.build();
|
||||||
|
|
Loading…
Add table
Reference in a new issue