Releases: alexmacarthur/vite-plugin-proxy-page
Better Sad-Path Handling, Dependency Updates
Two main pieces of functionality were introduced:
- Improved error logging when a particular selector couldn't be found on a remote page.
- Automatically creation of a root
index.html
file if one doesn't already exist. It's possible that if people intend to fully develop an application against a remote page, they might not think to create aindex.html
file locally, even though it's required by Vite.
Additionally, the Vite dependency was bumped to v4, warranting a major version bump.
Add Support for Mounting Script When Body Doesn't Exist.
Previously, the localEntryPoint
was injected just before the closing </body>
tag. This was usually fine, sometimes, people may work with a page that doesn't have HTML from a full page. This change makes it so that when the </body>
tag doesn't exist, the script tag will be injected after any of the HTML that is found.
Introduce Option for Disabling HTML Caching
By default, this plugin caches the remote HTML on initial fetch and holds onto it for as long as the Vite server runs. The latest version introduces a cacheHtml
option that, when set to false
, will refetch the remote HTML after each page reload or local code change.
Ensure Reliability of HMR
When the entry point is parsed, injects import.meta.hot
onto the beginning of the file in order to ensure that HMR works consistently.
Follow Redirects + Simplify Build Steps
This release:
- relies on TypesScript itself to generate CJS + ESM artifacts, rather than having them bundled by Vite
- switches to Axios for more reliable HTTP request handling (including the ability to automatically follow redirects)