Skip to content

Commit

Permalink
Merge branch 'release/1.2.5' into v1
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Welch committed Aug 14, 2020
2 parents 6b5c669 + ea5873f commit 230189d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Twigpack Changelog

## 1.2.5 - 2020-08-14
### Changed
* Fixed a regression from the `styles.js` error suppression that would cause it to throw an exception if you attempted to load it

## 1.2.4 - 2020-08-12
### Changed
* Suppress errors for `styles.js` modules (which is a work-around to a webpack bug)
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nystudio107/craft-twigpack",
"description": "Twigpack is a bridge between Twig and webpack, with manifest.json & webpack-dev-server HMR support",
"type": "craft-plugin",
"version": "1.2.4",
"version": "1.2.5",
"keywords": [
"craftcms",
"craft-plugin",
Expand Down
15 changes: 9 additions & 6 deletions src/helpers/Manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -344,12 +344,15 @@ public static function getModuleEntry(
$manifest = self::getManifestFile($config, $type);
if ($manifest !== null) {
// Make sure it exists in the manifest
if (empty($manifest[$moduleName]) && !in_array($moduleName, self::SUPPRESS_ERRORS_FOR_MODULES)) {
self::reportError(Craft::t(
'twigpack',
'Module does not exist in the manifest: {moduleName}',
['moduleName' => $moduleName]
), $soft);
if (empty($manifest[$moduleName])) {
// Don't report errors for any files in SUPPRESS_ERRORS_FOR_MODULES
if (!in_array($moduleName, self::SUPPRESS_ERRORS_FOR_MODULES)) {
self::reportError(Craft::t(
'twigpack',
'Module does not exist in the manifest: {moduleName}',
['moduleName' => $moduleName]
), $soft);
}

return null;
}
Expand Down

0 comments on commit 230189d

Please sign in to comment.