Download the PHP package chianglintu/spiral-vite-bridge without Composer
On this page you can find all versions of the php package chianglintu/spiral-vite-bridge. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download chianglintu/spiral-vite-bridge
More information about chianglintu/spiral-vite-bridge
Files in chianglintu/spiral-vite-bridge
Package spiral-vite-bridge
Short Description For this package there is no description available.
License
Informations about the package spiral-vite-bridge
Spiral Vite Bridge
Spiral bridge for Vite dev server and production manifest assets. It pairs with vite-plugin-spiral.
Install
Publish Configuration
The package ships a Spiral config file at config/vite.php. Copy it into your application:
Do not overwrite an existing app/config/vite.php without reviewing local changes first.
Expected location:
Register the bootloader after Spiral views and Stempler:
Stempler
@viteReactRefresh is only needed for React projects. @viteFonts() is only useful when the Vite plugin fonts option is configured.
PHP API
Configuration supports enabled, public_directory, build_directory, hot_file, asset_url, manifest, ssr_manifest, fonts_manifest, integrity_key, and fail_loud. Missing manifests, missing entries, invalid JSON, and invalid hot URLs throw explicit exceptions.
Common environment variables:
Useful state helpers:
hotFile()returns the active hot file path.isRunningHot()aliases dev-server detection.preloadedAssets()returns the modulepreload / prefetch URLs collected during tag rendering.
@viteFonts() renders font preloads plus stylesheet or inline @font-face output from the plugin fonts manifest, including optimized fallback CSS when generated.
Testing
Use Spiral\Vite\Testing\InteractsWithVite in Spiral tests and call withoutVite() to disable manifest lookups for a test. Disabled Vite renders empty tags and returns normalized fallback asset paths.