I can’t seem to deploy static assets alongside my hono-based application. The app itself is working fine, except that request that should go to static assets are passed to the hono app. The deployment’s resources tab only show the function handling ‘/’, no static resources.
Source code is in ./src/**/*.ts and is transpiled to ./dist. Static assets are in a ./public folder.
Project Settings > Framework Settings:
Framework Preset: hono
Output Directory: dist
Relevant snippets:
- vercel.json
“framework”: “hono”,
- package.json
"type": "module",
"main": "src/index.ts",
“scripts”: {
“prebuild”: “rm -rf dist && mkdir -p dist”,
“build”: “tsc && tsc-alias”,
},
“engines”: {
“node”: “20.x”
},
“dependencies”: {
“hono”: “^4”
},
“devDependencies”: {
“@types/node”: “^20”,
“tsc-alias”: “^1.8.16”,
“tsx”: “^4.7”,
“typescript”: “^5”,
“vercel”: “^47.0.5”,
}
- tsconfig.json
“compilerOptions”: {
“outDir”: “./dist”,
“paths”: { “@/\*”: \[“./src/\*”\] }
},
“tsc-alias”: {
“resolveFullPaths”: true,
}