Download the PHP package cable8mm/laravel-vite-s3 without Composer

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

Laravel Vite S3

Latest Stable Version Total Downloads License

Sync the Vite build output of a Laravel app to an S3 (or any Flysystem) disk with one artisan command — ideal for serving hashed assets from a CDN.

Extracted from a real-world Laravel application and packaged for reuse.

Features

Requirements

Installation

Laravel will automatically discover the service provider.

Publish the configuration file when you want to customize it:

Configuration

Add a local disk rooted at the Vite build output to config/filesystems.php if you don't have one yet (vite build writes to public/build by default):

And make sure your s3 disk is configured, e.g.:

The package configuration (config/vite-s3.php) looks like this:

Public read access for CDN-served assets

Files are uploaded with the credentials configured for your s3 disk. If the objects are not publicly readable, the CDN (or the browser) returns AccessDenied (403). Make sure one of the following is in place:

or grant public read access at the bucket level, or serve the bucket through a CDN distribution with an Origin Access Control (OAC). The package does not change the default visibility of your disk.

Usage

After vite build, run:

Output:

Options

Exit codes

Code Meaning
0 All files copied successfully
1 The source disk is empty, a configured disk does not exist, --delete was used with an empty target_path, or at least one file failed

Cache-Control headers

Vite emits content-hashed assets under the assets/ directory. These are safe to cache forever:

Everything else — typically manifest.json — changes on every deployment and gets a short cache instead:

The mapping is configured through cache_control.immutable_directories (first path segments) and the immutable/default values. Any missing key falls back to the package default. Set 'cache_control' => false to disable setting the header entirely.

Content types are detected automatically by the S3 adapter from the file contents.

Deploying

Add the copy step to your deploy script, e.g. as a Composer script:

or from your deployment tool of choice after npm run build:

Development

Credits

License

This package is open-sourced software licensed under the MIT license.


All versions of laravel-vite-s3 with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/console Version ^10.0|^11.0|^12.0|^13.0
illuminate/filesystem Version ^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^10.0|^11.0|^12.0|^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 cable8mm/laravel-vite-s3 contains the following files

Loading the files please wait ...