Skip to content

Commit

Permalink
Merge branch 'release/1.0.17' into v1
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Welch committed Dec 14, 2021
2 parents 34c88f5 + 10e8884 commit 2703500
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Plugin Vite Changelog

## 1.0.17 - 2021.12.14
### Fixed
* Fixed an issue where the needle/haystack logic was reversed in `strpos()` which could cause it to not match properly in some setups ([#5](https://github.com/nystudio107/craft-plugin-vite/pull/5))

## 1.0.16 - 2021.10.28
### Changed
* refactor(manifest): No longer search `dynamicImports` for CSS to extract, since the Vite loader takes care of that for us ([#2](https://github.com/nystudio107/craft-plugin-vite/pull/2))

## 1.0.15 - 2021.10.21
### Fixed
* Fixed an issue with potentially duplicated `modulepreload` links by adding tags via an associative array ([#16](https://github.com/nystudio107/craft-vite/issues/16))
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "nystudio107/craft-plugin-vite",
"description": "Plugin Vite is the conduit between Craft CMS plugins and Vite, with manifest.json & HMR support",
"version": "1.0.15",
"version": "1.0.17",
"keywords": [
"craftcms",
"plugin",
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/ManifestHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public static function extractManifestTags(string $path, bool $asyncCss = true,
continue;
}
// If the $path isn't in the $manifestKey, skip it
if (strpos($path, $manifestKey) === false) {
if (strpos($manifestKey, $path) === false) {
continue;
}
// Include the entry script
Expand Down Expand Up @@ -263,7 +263,7 @@ protected static function extractCssFiles(array $manifest, string $manifestKey,
return [];
}
$cssFiles = array_merge($cssFiles, $entry['css'] ?? []);
$imports = array_merge($entry['imports'] ?? [], $entry['dynamicImport'] ?? []);
$imports = $entry['imports'] ?? [];
foreach ($imports as $import) {
self::extractCssFiles($manifest, $import, $cssFiles);
}
Expand Down

0 comments on commit 2703500

Please sign in to comment.