Skip to content

Releases: nystudio107/craft-vite

Version 1.0.14

10 Aug 19:41
Compare
Choose a tag to compare

Added

Version 1.0.13

15 Jul 03:50
Compare
Choose a tag to compare

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

15 Jul 03:06
Compare
Choose a tag to compare

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

29 Jun 13:51
Compare
Choose a tag to compare

Changed

  • Roll back the automatic inclusion of @vite/client.js (#9)

Version 1.0.10

29 Jun 00:43
Compare
Choose a tag to compare

Changed

  • Always include the @vite/client.js script if the dev server is running (#9)

Version 1.0.9

06 Jun 02:29
Compare
Choose a tag to compare

Added

  • Added craft.vite.getCssHash() that returns the content hash for the build CSS assets

Version 1.0.8

05 Jun 17:33
Compare
Choose a tag to compare

Added

  • Added craft.vite.includeCriticalCssTags() to make it easy to include inline Critical CSS generated via rollup-plugin-critical

Version 1.0.7

21 May 20:25
Compare
Choose a tag to compare

Added

  • Added a includeReactRefreshShim setting that will automatically include the required shim for react-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

20 May 18:16
Compare
Choose a tag to compare

Changed

  • Change the default useDevServer setting to App::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 been nomodule

Version 1.0.5

14 May 19:16
Compare
Choose a tag to compare

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 of registerScript()
  • Make the cache last for 30 seconds with devMode on
  • Refactored to ViteVariableInterface & ViteVariableTrait