Releases: nystudio107/craft-vite
Releases · nystudio107/craft-vite
Version 1.0.14
Added
- Added Preload Directives Generation that will automatically generate
<link rel="modulepreload">
directives for entry chunks and their direct imports (PR#2)
Version 1.0.13
Added
- Added a
craft.vite.devServerRunning()
method to allow you to determine if the Vite dev server is running or not from your Twig templates (#10)
Version 1.0.12
Changed
- Switched the
checkDevServer
test file to@vite/client
to accommodate with the change in Vite^2.4.0
to use the.mjs
extension (#11)
Version 1.0.11
Changed
- Roll back the automatic inclusion of
@vite/client.js
(#9)
Version 1.0.10
Changed
- Always include the
@vite/client.js
script if the dev server is running (#9)
Version 1.0.9
Added
- Added
craft.vite.getCssHash()
that returns the content hash for the build CSS assets
Version 1.0.8
Added
- Added
craft.vite.includeCriticalCssTags()
to make it easy to include inline Critical CSS generated viarollup-plugin-critical
Version 1.0.7
Added
- Added a
includeReactRefreshShim
setting that will automatically include the required shim forreact-refresh
when the Vite dev server is running (#5)
Changed
- Removed custom user/agent header that was a holdover from
curl
- Re-worked how the various JavaScript shims are stored and injected
Version 1.0.6
Changed
- Change the default
useDevServer
setting toApp::env('ENVIRONMENT') === 'dev'
(#6) - Refactored the code from a monolithic
ViteService
to helpers, as appropriate
Fixed
- Fixed an issue where it was outputting
type="nomodule"
for legacy scripts, when it should have just beennomodule
Version 1.0.5
Added
- Moved the live reload through Twig errors to the ViteService so that plugins can get it too
- Added
.inline()
to allow for inlining of local or remote files in your templates, with a caching layer
Changed
- Use
registerJsFile()
instead ofregisterScript()
- Make the cache last for 30 seconds with
devMode
on - Refactored to
ViteVariableInterface
&ViteVariableTrait