Download the PHP package davidhirtz/yii2-vite without Composer

On this page you can find all versions of the php package davidhirtz/yii2-vite. 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 yii2-vite

yii2-vite

Vite for the Yii 2 skeleton: registers an entry's script, stylesheets and modulepreload links from Vite's manifest, or from the dev server while it runs.

Version 3 requires davidhirtz/yii2-skeleton ^3.8. Projects outside the skeleton stay on ^0.5 (branch v0).

Vite

build.manifest is required. The defaults below expect the build in web/dist:

Configuration

The bundle registers the vite component, so a project configures only what differs from these defaults:

While useDevServer is on, every request checks for the dev server by opening a TCP connection to devServerInternalUrl, at most devServerTimeout long. When it answers, entries load from it with @vite/client for hot module replacement; when not, from the manifest. checkDevServer => false skips the check and always uses the dev server.

Inline stylesheets

With inlineCssMaxSize set, an entry whose stylesheets together are no larger than that many bytes renders them as <style> tags instead of links, saving the render-blocking request. It suits a small site that loads the page once and swaps the content afterwards (AjaxRouteTrait): registered in the layout, the styles reach the first response alone. An entry's stylesheets are inlined all or none, so their order holds; one an earlier entry already linked or inlined stays as it is. Relative url()s and the source map comment are made absolute against baseUrl. The dev server always links.

An inlined stylesheet is not cached by the browser, so every full page load carries it again.

Usage

Script and modulepreload tags carry the view's CSP nonce. A sha384 integrity in the manifest (as written by e.g. vite-plugin-manifest-sri) is added to both.


All versions of yii2-vite with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
davidhirtz/yii2-skeleton Version ^3.8
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 davidhirtz/yii2-vite contains the following files

Loading the files please wait ...