- Add a
craft.vite.integrity()method that will extract the integrity hash (for building a Content Security Policy) - Added an
includeScriptOnloadHandlerconfig setting that allows you to disable the adding of anonloadhandler on the<script>tags (useful when implementing a Content Security Policy)
- Filter out empty attributes so they don't render on the
<script>tags
- Use
strrposinstead ofstrposwhen attempting to extract a file name without the hash (#28)
- By default, only load the Vite AssetBundle if the request is a CP request or a preview request. This can be overridden via the
useForAllRequestsVitePluginService property (#27)
- Normalize file system paths before fetching them with
file_get_contents()(#25)
- Stable release for Craft CMS 5
- Fixed an issue where
craft.vite.entry()would fail if you were using Vite 5 or later, due to theManifestHelper::fileNameWithoutHash()function not working correctly (#24)
- If the
devServeris running, theViteService::fetch()method will try to use thedevServerInternalURL first, falling back on thedevServerPublicso thatcraft.vite.inline()can pull from thedevServerif it is running (#22) - Add
phpstanandecscode linting - Add
code-analysis.yamlGitHub action
- PHPstan code cleanup
- ECS code cleanup
- Initial beta release