App To Page serves whatever you upload, but there’s one build setting worth getting right so your app is portable across any URL: use a relative base.
Why a relative base
When you build a single-page app, the bundler writes asset links into index.html. By default many
setups assume the app lives at the domain root (/assets/…). Mounted at your-site.com/my-app, those
root-absolute links can break.
A relative base (./) makes every asset link relative to the page, so the same build works at any
mount path. App To Page also rewrites paths on upload as a safety net — but building relative is the
clean way to do it.
Set the base
Vite — in vite.config.js:
export default {
base: './',
};
Create React App — in package.json:
{
"homepage": "."
}
Vue CLI — in vue.config.js:
module.exports = {
publicPath: './',
};
Build and zip
npm run build
This produces a dist/ (Vite/Vue) or build/ (CRA) folder. Zip its contents so index.html is
at the top of the archive.
Upload
Open App To Page → Apps, drop the zip, pick a URL like /my-app, Create draft, Preview,
then Publish. Done — it’s live at your-site.com/my-app.
Client-side routing
Using React Router, Vue Router, or any client-side router? Leave SPA fallback on (it’s the
default). Unknown sub-paths — like a deep link a user bookmarked — are served your index.html so the
router can take over. Deep links just work.
Seeing a blank page or a “check base path” note after upload? That’s almost always an absolute-base build. See troubleshooting.