=== App To Page ===
Contributors: zbalkhi
Tags: static, spa, vite, react, hosting
Requires at least: 5.8
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Upload a built front-end app (Vite/React/Vue bundle or plain HTML/JS) and serve it at a URL of your choosing. No theme, no shortcodes, no FTP.

== Description ==

App To Page lets you take the built output of any browser-only app — a Vite/React/Vue `dist/` folder, or a plain HTML/JS game like Snake — zip it, upload it, pick a URL, and have it served there directly. The plugin intercepts the request and streams your app's files, bypassing the WordPress theme entirely, so your app renders exactly as it does locally.

= How it works =

1. Open the **App To Page** screen in the left admin menu.
2. Drag a `.zip` of your built app onto the dropzone (the contents of `dist/`/`build/`, with an `index.html` at the top level — a single wrapping folder is fine). Confirm the name and URL.
3. Preview the draft privately, then publish it.
4. Visit the URL. Your app is live. Optionally restrict it to logged-in users.

= Notes for bundlers (Vite/React/Vue) =

For assets to resolve at any mount path, build with a **relative base**:

`// vite.config.js`
`export default { base: './' }`

Then build and zip the `dist/` folder. Create React App users can set `"homepage": "."` in `package.json`. Plain HTML/JS apps with relative paths work as-is.

The plugin injects a `<base>` tag and rewrites root-absolute references in `index.html` automatically, but JavaScript files built with an absolute base (`/assets/...`) can still hard-code paths the plugin can't safely rewrite — hence the relative-base recommendation. If an app is flagged "check base path" in the list, that's why.

= Roadmap =

* Pull pre-built artifacts from a GitHub repo / Release (no server-side build).
* Per-app versioning and rollback.

== Changelog ==

= 0.1.0 =
* Initial release: ZIP upload, slug/page mounting, static serving with SPA fallback.
