diff --git a/package.json b/package.json index 7b857a53..9d5bfc13 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,11 @@ "scripts": { "dev": "vite --port 3000", "build": "tsc && vite build", + "build:mog": "BUILD_MODE=BUILT_IN tsc && vite build", "preview": "vite preview", "format": "prettier --write \"src/**/*.ts\" \"src/**/*.tsx\"", "lint": "eslint --ext .ts,.tsx --ignore-path .gitignore . --fix", - "prepublishOnly": "npm run build", + "prepublishOnly": "npm run build:mog", "publish-release": "pnpm publish --access public", "publish-next": "pnpm publish --access public --tag next" }, diff --git a/vite.config.ts b/vite.config.ts index 52fdecfc..28b5090f 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,6 +5,7 @@ import * as path from "path"; // https://vitejs.dev/config/ export default defineConfig({ + base: process.env.BUILD_MORE === "BUILT_IN" ? "/console" : "/", plugins: [react()], // alias resolve: {