Download the PHP package apility/laravel-mix-components without Composer
On this page you can find all versions of the php package apility/laravel-mix-components. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download apility/laravel-mix-components
More information about apility/laravel-mix-components
Files in apility/laravel-mix-components
Package laravel-mix-components
Short Description apility/laravel-mix-components
License MIT
Informations about the package laravel-mix-components
Laravel Mix Components
An easier way of including laravel mix in your project.
Laravel Mix Components provides components for easily connecting your laravel mix setup to your html.
Whether you run build
, watch
, or hot
, this will read the manifest and insert the right <script>
and <link>
tags at the appropriate places.
Installation
$ composer require apility/laravel-mix-components
Usage
Insert the <x-mix-head />
and <x-mix-body />
blade components at the end of your <head>
and <body>
.
Configuration
Props
preload
Preloads asssets.
This prop only applies to <x-mix-head />
Example
integrity
Generates SRI integrity hashes for each asset.
Must be a valid algorithm supportedd by PHP. Most browsers only supports sha256
, sha384
and sha512
.
Example
crossorigin
Sets the crossorigin CORS attribute. Often required by the browser if the asset is located on a different origin. If SRI is enabled, the crossorigin value must be set, otherwise the browser treats it like the integrity hash is invalid.
Example
manifest-directory
Laravel Mix will by default output the hot
and mix-manifest.json
files in the root of /public
.
Laravel Mix Components can be configured to read the file in another directory.
The path segment given will be appended to the base directory /public
.
This prop must be set on both <x-mix-head />
and <x-mix-body />
.