- Add a
craft.vite.integrity()
method that will extract the integrity hash (for building a Content Security Policy) - Added an
includeScriptOnloadHandler
config setting that allows you to disable the adding of anonload
handler 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
strrpos
instead ofstrpos
when 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
useForAllRequests
VitePluginService 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
devServer
is running, theViteService::fetch()
method will try to use thedevServerInternal
URL first, falling back on thedevServerPublic
so thatcraft.vite.inline()
can pull from thedevServer
if it is running (#22) - Add
phpstan
andecs
code linting - Add
code-analysis.yaml
GitHub action
- PHPstan code cleanup
- ECS code cleanup
- Initial beta release