webapp-scaffold/package.json
Uwe Schuster b1a13b83fd #6: Use Vite's loadEnv() for VITE_BASE so .env.production actually wins
defineAdminConfig / defineGuestConfig were reading process.env.VITE_BASE,
but Vite does NOT populate process.env from .env files at config-evaluation
time — those go into import.meta.env for the client bundle only. So the
VITE_BASE that new-project.sh writes to frontend/.env.production was
silently ignored, base fell back to '/', and SPA assets 404'd behind the
Apache /projects/<name>/ proxy prefix (blank page on every public route).

Switch both factories to Vite's defineConfig + loadEnv pattern. A
process.env.VITE_BASE override still wins so CI invocations that
explicitly export the variable keep working.

Bumps to 0.3.6.

Closes #6

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 21:36:23 +02:00

56 lines
1.6 KiB
JSON

{
"name": "@uschuster/webapp-scaffold",
"version": "0.3.6",
"description": "Shared build scripts + Vite config factories for webapp-template-derived projects.",
"type": "module",
"bin": {
"webapp-scaffold-fetch-openapi": "bin/fetch-openapi.sh",
"webapp-scaffold-postprocess-openapi": "bin/postprocess-openapi.py",
"webapp-scaffold-inject-hashes": "bin/inject-hashed-filenames.py"
},
"main": "dist/vite-config.js",
"module": "dist/vite-config.js",
"types": "dist/vite-config.d.ts",
"exports": {
".": {
"types": "./dist/vite-config.d.ts",
"import": "./dist/vite-config.js"
},
"./core-fetch": {
"types": "./dist/core-fetch.d.ts",
"import": "./dist/core-fetch.js"
},
"./i18n": {
"types": "./dist/i18n.d.ts",
"import": "./dist/i18n.js"
},
"./i18n-react": {
"types": "./dist/i18n-react.d.ts",
"import": "./dist/i18n-react.js"
},
"./orval-template": "./templates/orval.config.template.ts"
},
"files": ["bin/", "dist/", "src/", "templates/", "README.md", "LICENSE"],
"scripts": {
"prepare": "tsc || true"
},
"devDependencies": {
"typescript": "^5.0.0",
"@types/node": "^22.0.0",
"@types/react": "^19.0.0"
},
"peerDependencies": {
"vite": "^6.0.0",
"@vitejs/plugin-react": "^4.0.0",
"react": "^19.0.0"
},
"peerDependenciesMeta": {
"react": { "optional": true }
},
"repository": {
"type": "git",
"url": "http://127.0.0.1:3000/uwe.admin/webapp-scaffold.git"
},
"license": "UNLICENSED",
"private": true
}