Version 4.0.0-beta.4

April 26, 2022

Changed

  • Don't log the full exception on a Guzzle error, just log the message

Version 4.0.0-beta.3

April 17, 2022

Fixed

  • Fix incorrect User-Agent header that could cause an error to be thrown

Version 4.0.0-beta.2

March 4, 2022

Fixed

  • Updated types for Craft CMS 4.0.0-alpha.1 via Rector

Version 4.0.0-beta.1

February 24, 2022

Added

  • Initial Craft CMS 4 compatibility

Version 1.2.15

July 11, 2021

Changed

Version 1.2.14

April 28, 2021

Changed

  • Move settings from the composer.json “extra” to the plugin main class

Fixed

Version 1.2.13

April 13, 2021

Added

  • Added buildchain for docs

Fixed

Version 1.2.12

April 5, 2021

Changed

  • Catch all errors thrown by Guzzle

Fixed

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 the manifest.json will auto-cache bust if the file changes

Changed

  • Default devServerBuildType reverted to modern

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 internal devServer.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 is true 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 to resolveTemplate()

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 the server manifestPath

Version 1.1.3

October 31, 2018

Changed

  • Make includeCriticalCssTags() and includeInlineCssTags() 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 in config.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 the manifest.json cannot be found

Version 1.0.0

September 21, 2018

Added

  • Initial release