Handle the case where there is an error decoding the JSON from the manifest
Updated the documentation to reflect using @webroot/
by default for the server
manifestPath
Make includeCriticalCssTags()
and includeInlineCssTags()
soft errors that do nothing if the file is missing
Added the ability for Hot Module Replacement (HMR) to work through Twig error template pages via the errorEntry
setting in config.php
Fixed an issue where if the manifest.json
was served remotely via https, Twigpack was unable to load it
Made all errors "soft" for missing CSS/JS modules, so a warning will be logged, but life continues on
Strings passed in to manifestPath
can now be Yii2 aliases as well
Added craft.twigpack.includeFile()
Added craft.twigpack.includeFileFromManifest()
Added craft.twigpack.includeInlineCssTags()
Added craft.twigpack.includeCriticalCssTags()
Check via empty()
rather than !== null
when checking the manifest for module entries
CSS module loading generates a soft error now, rather than throwing an NotFoundHttpException
Added this.onload=null;
to async CSS link tag
Added craft.twigpack.includeCssRelPreloadPolyfill()
Better error reporting if modules don't exist in the manifest
Allow the manifestPath
to be a file system path or a URI
Added getModuleUri()
function
Added getManifestFile()
function
Fixed return types to allow for null
Code refactoring
Better error logging if the manifest file can't be found (check storage/logs/web.log
)
Throw a NotFoundHttpException
if the manifest.json
cannot be found
You can’t perform that action at this time.