Twigpack
Version 1.2.18
April 5, 2024
Added
- Add
phpstan
andecs
code linting - Add
code-analysis.yaml
GitHub action
Changed
- Updated docs to use node 20 & a new sitemap plugin
- PHPstan code cleanup
- ECS code cleanup
Version 1.2.17
April 26, 2022
Changed
- Don't log the full exception on a Guzzle error, just log the message
Version 1.2.16
April 17, 2022
Fixed
- Fix incorrect
User-Agent
header that could cause an error to be thrown
Version 1.2.15
July 11, 2021
Changed
- Wrap calls to
is_file()
with try/catch, to handle open_basedir restrictions that cause exceptions to be thrown (https://github.com/nystudio107/craft-twigpack/issues/73) - Switched documentation system to VitePress
Version 1.2.14
April 28, 2021
Changed
- Move settings from the
composer.json
“extra” to the plugin main class
Fixed
- Fix
DOCSDEST
path - No longer invalidate caches immediately in local dev, and instead rely on the 1s cache (https://github.com/nystudio107/craft-twigpack/issues/67)
Version 1.2.13
April 13, 2021
Added
- Added buildchain for docs
Fixed
- Fixed a malformed
User-Agent
header in a request tomix-manifest.json
(https://github.com/nystudio107/craft-twigpack/issues/62)
Version 1.2.12
April 5, 2021
Changed
- Catch all errors thrown by Guzzle
Fixed
- Add a
100ms
delay when requesting the manifest file if using it in hot mode, as a hack to avoid awebpack-dev-server
/ Tailwind CSS JIT race condition (https://github.com/nystudio107/craft/issues/55)
Version 1.2.11
March 21, 2021
Changed
- Use Guzzle for remote file fetches rather than
curl
, for improved performance
Version 1.2.10
February 24, 2021
Added
- Added a
FileDependency
cache dependency for files loaded from a local path, so things like themanifest.json
will auto-cache bust if the file changes
Changed
- Default
devServerBuildType
reverted tomodern
Version 1.2.9
January 12, 2021
Changed
- Default devServerBuildType to
combined
Fixed
- Ensure that
getHttpResponseCode()
returns a 404 on error
Version 1.2.8
January 12, 2021
Fixed
- Fixed an issue where
includeFileFromManifest()
wouldn't properly fall back on non-hot files if the URL returned a 404 with HTML content
Version 1.2.7
December 11, 2020
Fixed
- Fixed the
craft.twigpack.includeFileFromManifest()
so that it will use the internaldevServer.publicPath
setting for HMR
Version 1.2.6
September 16, 2020
Changed
- Ensure that a string is always passed to
Template::raw()
- Updated the docs
Version 1.2.5
August 14, 2020
Changed
- Fixed a regression from the
styles.js
error suppression that would cause it to throw an exception if you attempted to load it
Version 1.2.4
August 12, 2020
Changed
- Suppress errors for
styles.js
modules (which is a work-around to a webpack bug)
Version 1.2.3
June 24, 2020
Added
- Added the ability to pass down an
$attributes
array to functions that generate tags, so you can add arbitrary HTML attributes
Version 1.2.2
May 25, 2020
Added
- Added
cspNonce
setting to allow for Content Security Policy nonce support for inline CSS/JS
Changed
- Switched over to using Yii2's
Html::
helpers for creating various tags
Fixed
- Make sure
$moduleHash
is never undefined
Version 1.2.1
May 4, 2020
Added
- Added the config setting
devServerBuildType
to determine which webpack-dev-server bundle is loaded. - Support passing an array of filenames for
errorEntry
Version 1.2.0
February 28, 2020
Changed
- Switched over to using
media="print"
for asynchronously loading a stylesheet as per The Simplest Way to Load CSS Asynchronously - Deprecated
craft.twigpack.includeCssRelPreloadPolyfill()
since it is no longer necessary. It now does nothing
Version 1.1.14
February 4, 2020
Added
- If this is a dev-server, look for the modern manifest file first
Version 1.1.13
January 22, 2020
Added
- Added the config setting
useAbsoluteUrl
to control whether module URLs will be forced to be fully qualified aboslute URLs
Changed
- If we're in
devMode
invalidate the cache immediately - If an error is reported, and
self::$isHot
istrue
log it as a warning, not an error
Version 1.1.12
November 12, 2019
Fixed
- Fixed an issue with
includeFileFromManifest()
not working due to recent changes
Version 1.1.11
October 15, 2019
Changed
- Revert a PR that caused Twigpack to no longer gracefully fall back on locally built assets if the
webpack-dev-server
is not running - Add a short timeout to
file_get_contents
to prevent it from taking too long if the file doesn't exist
Version 1.1.10
October 3, 2019
Changed
- Changed examples to use
’dev’
for local development (instead of’local’
)
Version 1.1.9
October 1, 2019
Added
- Added
getModuleHash()
function, to grab the hash key of a module
Changed
- Fixed an issue where
isHot
was not set before use - Fixed
getFileFromManifest()
to load files from webpack-dev-server
Version 1.1.8
August 6, 2019
Changed
- Added
cacheKeySuffix
to the Settings model
Version 1.1.7
June 5, 2019
Changed
- Clarify expected output with no second param
- Code cleanup
Version 1.1.6
May 5, 2019
Changed
- Fixed an issue where
null
could potentially be passed in toresolveTemplate()
Version 1.1.5
March 24, 2019
Changed
- Fixed a typo in the
twigpack-manifest-cache
cache key - Changed deprecated
\Twig_Markup
to\Twig\Markup
- Elaborated on Twigpack's caching and how to clear it in the
README.md
Version 1.1.4
January 22, 2019
Changed
- Handle the case where there is an error decoding the JSON from the manifest
- Updated the documentation to reflect using
@webroot/
by default for theserver
manifestPath
Version 1.1.3
October 31, 2018
Changed
- Make
includeCriticalCssTags()
andincludeInlineCssTags()
soft errors that do nothing if the file is missing
Version 1.1.2
October 25, 2018
Added
- Added the ability for Hot Module Replacement (HMR) to work through Twig error template pages via the
errorEntry
setting inconfig.php
Version 1.1.1
October 16, 2018
Changed
- 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
Version 1.1.0
October 9, 2018
Added
- 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()
Version 1.0.5
September 28, 2018
Changed
- 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
Version 1.0.4
September 28, 2018
Added
- Added
this.onload=null;
to async CSS link tag - Added
craft.twigpack.includeCssRelPreloadPolyfill()
Changed
- Better error reporting if modules don't exist in the manifest
Version 1.0.3
September 24, 2018
Changed
- Allow the
manifestPath
to be a file system path or a URI
Version 1.0.2
September 23, 2018
Added
- Added
getModuleUri()
function - Added
getManifestFile()
function
Changed
- Fixed return types to allow for null
- Code refactoring
Version 1.0.1
September 22, 2018
Added
- Better error logging if the manifest file can't be found (check
storage/logs/web.log
) - Throw a
NotFoundHttpException
if themanifest.json
cannot be found
Version 1.0.0
September 21, 2018
Added
- Initial release