Download the PHP package vendi-advertising/vendi-asset-loader without Composer
On this page you can find all versions of the php package vendi-advertising/vendi-asset-loader. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vendi-advertising/vendi-asset-loader
More information about vendi-advertising/vendi-asset-loader
Files in vendi-advertising/vendi-asset-loader
Package vendi-asset-loader
Short Description Dynamically enqueue CSS and JS files
License MIT
Informations about the package vendi-asset-loader
vendi-asset-loader
Version 1 was a more complex version that supported multiple loading paths. It has since been rewritten to be much simpler and follow common patterns with less customizations (that were almost never used). Please only use version 2 going forward. You can find the version 1 documention here.
Install
Configure
The asset loader relies almost completely on the following environment variables.
NOTE! This module does not actually perform logic related to .env
files, it is up to the theme to handle this if needed. Generally speaking, however, you can usually create a file named .env.local
with these values to override. Otherwise the system assumes true environment variables.
THEME_MODE
- Supported values:
prod
- Forces bothTHEME_CSS_MODE
andTHEME_JS_MODE
intostatic
modestage
- No difference currentlydev
(default) - No difference currently
- Supported values:
THEME_CSS_MODE
- Supported values:
dynamic
(default) - Loads CSS files from the/css/
relative to the path theme root following the glob pattern/css/[0-9][0-9][0-9]-*.css
static
- Loads CSS files as defined in the webpack encore entry file
- Usage notes:
- If
THEME_MODE
is set toprod
, this configured value is ignore and insteadstatic
is always used
- If
- Supported values:
THEME_JS_MODE
- Supported values:
dynamic
(default) - Loads JS files from the/js/
relative to the path theme root following the glob pattern/js/[0-9][0-9][0-9]-*.js
static
- Loads JS files as defined in the webpack encore entry file
- Usage notes:
- If
THEME_MODE
is set toprod
, this configured value is ignore and insteadstatic
is always used
- If
- Supported values:
THEME_WEBPACK_ENTRY_FILE
- Supported values:
- Either the absolute path to the webpack file or a path relative to the theme's root
- Default:
./static/build/entrypoints.json
- Supported values:
THEME_WEBPACK_ENTRY_DEFAULT
- Supported values:
- The name for the theme's default entry that should represent the bulk of the CSS and JS required to load the site.
- Default:
main
- Supported values:
Usage
All versions of vendi-asset-loader with dependencies
symfony/filesystem Version ^6|^7
webmozart/glob Version ^4.6