Download the PHP package goognet/vite-plain-html without Composer

On this page you can find all versions of the php package goognet/vite-plain-html. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package vite-plain-html

vite-plain-html

Makes Laravel's Vite helper emit plain HTML link tags, without the XHTML style slash.

Laravel's @vite directive hardcodes the terminator on every link tag it prints:

This package makes it print:

Installation

That is the whole setup. The service provider is auto-discovered, and your views keep calling @vite(...) as they do today.

Note this is a runtime dependency, not a dev one: the tags are generated on every request.

How it works

Illuminate\Foundation\Vite builds its link tags in three protected methods, each ending in a hardcoded ' />':

method tag
makePreloadTagForChunk <link rel="preload">
makeStylesheetTagWithAttributes <link rel="stylesheet">
renderFontPreloads <link rel="preload" as="font">, from @vite fonts

There is no option for it — useStyleTagAttributes() and usePreloadTagAttributes() only add attributes.

So this package subclasses the helper and rebinds it in the container. Each override hands the work to Laravel and rewrites the terminator on the way out, so none of Laravel's attribute logic is copied here and an upgrade cannot leave a stale copy of it behind:

The terminator is only rewritten at the end of a line, so a /> inside an attribute value is left alone.

Script tags are untouched — Laravel already prints those as <script ...></script>.

Requirements

Laravel 12 and earlier have the same two link tag methods but no renderFontPreloads, so this package targets 13 only.

License

MIT. See LICENSE.md.


All versions of vite-plain-html with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3.0
laravel/framework Version ^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package goognet/vite-plain-html contains the following files

Loading the files please wait ...