github s2b/vite-asset-collector 2.0.0

49 minutes ago

I'm pleased to announce the second major version of Vite AssetCollector for TYPO3. The old version served us well over the past years, but it became clear to me that a major rework is overdue to stay flexible enough for more advanced use cases.

Major changes:

  • The previous PHP API ViteService has been replaced completely with a modular, interface-based class structure. The most common use cases are covered by the new ViteHelper class. Docs: PHP API
  • Referenced JavaScript modules and woff2 font files are now preloaded by default.
  • A new flexible embedding configuration covers even more use cases and combinations than before, accessible both from Fluid and the PHP API. Docs: <vite:asset> ViewHelper
  • In combination with the new devServerStatus option of vite-plugin-typo3, TYPO3 can now detect if the dev server is running or not and can act accordingly.
  • The embedding for the dev server now more closely mimicks the production embedding.

Even though the required changes in Fluid templates are minimal, I encourage everyone to take a look at the migration guide and to consider migrating away from the old ViewHelper arguments in favor of the new flexible configuration. The extension remains compatible with TYPO3 v13 and v14 and only drops support for Vite < 5, which can be considered outdated now.

Thank you to everyone who gave feedback, reported bugs, submitted PRs or talked to me about Vite at TYPO3 events. I hope that you'll be satisfied with how this new version turned out. 🧡

What's Changed

  • [!!!][TASK] Remove deprecated config command by @s2b in #189
  • [TASK] Adjust test assertment for change in upstream main by @s2b in #191
  • Task/test15 by @s2b in #192
  • [TASK] Allow symfony 8 for TYPO3 dev-main by @s2b in #193
  • [BUGFIX] Respect cssTagAttributes for css entrypoints in dev server mode by @wazum in #194
  • [TASK] Set version to 1.18.3 by @s2b in #197
  • [!!!][TASK] Don't resolve symlinks for entry files by @s2b in #199
  • [TASK] Remove "external" switch by @s2b in #200
  • [!!!][TASK] Remove support for vite < 5 by @s2b in #201
  • [TASK] Remove obsolete TODO by @s2b in #202
  • [TASK] Improve manifest model by @s2b in #203
  • [!!!][TASK] Don't apply custom attributes to vite client by @s2b in #204
  • [TASK] Strip default options for asset collector by @s2b in #205
  • [TASK] Avoid state in tests by @s2b in #207
  • [TASK] Remove test setUp() by @s2b in #208
  • [TASK] Register vite Fluid namespace globally by @Kanti in #210
  • [TASK] Remove obsolete vite config templates by @s2b in #211
  • [TASK] Introduce abstract functional test by @s2b in #212
  • [TASK] Use realistic paths in unit tests by @s2b in #213
  • [TASK] Remove obsolete test fixtures by @s2b in #214
  • [!!!][TASK] Apply script tag attributes consistently by @s2b in #215
  • [TASK] Update phpstan and run in test matrix by @s2b in #216
  • [TASK] Don't reference non-existing files in fixtures by @s2b in #217
  • [!!!][TASK] Split ViteService into smaller services and data structures by @s2b in #218
  • Task/unit tests by @s2b in #219
  • [!!!][TASK] Remove ViteService by @s2b in #220
  • [TASK] Define interfaces for service classes by @s2b in #222
  • [FEATURE] Add csp flag to vite:asset by @s2b in #223
  • [BUGFIX] Rewrite relative paths in inline CSS by @s2b in #224
  • [TASK] Provide request object to uri generator by @s2b in #225
  • [TASK] Helper to provide request object in tests by @s2b in #226
  • [!!!][TASK] Remove ViewHelper name aliases by @s2b in #228
  • [TASK] Avoid deprecated PathUtility methods by @s2b in #229
  • [TASK] Remove obsolete class alias configuration by @s2b in #231
  • [TASK] Switch to asset publishing API for TYPO3 v14 by @s2b in #227
  • [TASK] Streamline boolean attribute handling by @s2b in #232
  • [TASK] Strip public path from output files by @s2b in #233
  • [!!!][FEATURE] Automatic asset/import preloading by @s2b in #234
  • [!!!][TASK] Add CSS with priority=true by default by @s2b in #235
  • [FEATURE] Advanced embedding configuration in Fluid templates by @s2b in #236
  • Task/phpstan by @s2b in #238
  • [FEATURE] ViteHelper to simplify PHP API by @s2b in #241
  • [!!!][TASK] Let vite:uri return URI object by @s2b in #242
  • [TASK] Improve test coverage by @s2b in #244
  • [TASK] Optimize vite context middleware position by @s2b in #245
  • [BUGFIX] Don't inherit URI parts for dev server configured by port by @s2b in #246
  • [BUGFIX] Prevent double or missing slash for dev server with path by @s2b in #247
  • [BUGFIX] Avoid PHP 8.5 array_last() function by @s2b in #248
  • [TASK] Cover module+async use case for script loading by @s2b in #249
  • [BUGFIX] Use unique exception code in vite:uri ViewHelper by @s2b in #250
  • [FEATURE] Mimick embedding in dev server context by @s2b in #251
  • [TASK] Clarify that AssetRenderer can only handle script/css by @s2b in #252
  • [TASK] Rename renderAsset() to renderBuildAsset() by @s2b in #253
  • [TASK] Improve type checks in manifest code by @s2b in #254
  • [TASK] Small code cleanups by @s2b in #255
  • [!!!][TASK] Streamline internal CSS asset identifiers by @s2b in #256
  • [TASK] Enforce strict usage of new ViewHelpers in templates by @s2b in #257
  • [FEATURE] Fine-grained controll for asset preloading by @s2b in #258
  • [TASK] Throw proper exception for invalid manifest.json syntax by @s2b in #259
  • [TASK] Streamline test files by @s2b in #260
  • [BUGFIX] Avoid naming conflicts between manifest files by @s2b in #261
  • [BUGFIX] Ignore case for file extensions by @s2b in #262
  • [TASK] Use correct nonce API by @s2b in #263
  • [TASK] Optimization and cleanup by @s2b in #264
  • [TASK] Use readonly properties instead of getters for vite context by @s2b in #265
  • [TASK] Escape HTML attribute values in AssetRenderer by @s2b in #266
  • [TASK] Respect configured HTML doctype by @s2b in #267
  • [TASK] Remove obsolete TODO in ManifestFactory by @s2b in #268
  • Task/prepare release by @s2b in #269
  • Doc/version2 by @s2b in #270
  • [FEATURE] Allow setting dev server status via environment variable by @s2b in #221

New Contributors

Full Changelog: 1.18.1...2.0.0

Don't miss a new vite-asset-collector release

NewReleases is sending notifications on new releases.