Search by

praetorius / vite-asset-collector

s2b

Use AssetCollector to embed frontend assets generated by vite

Package info

github.com/s2b/vite-asset-collector

Type:typo3-cms-extension

pkg:composer/praetorius/vite-asset-collector

Statistics

Installs: 477 333

Dependents: 2

Suggesters: 3

Stars: 58

Open Issues: 5

2.0.1 2026-11-18 12:33 UTC

README

tests Total downloads TYPO3 versions Latest version

Vite Logo

Vite AssetCollector allows you to use the modern frontend bundler Vite to build your TYPO3 project's frontend assets.

Documentation

Documentation on docs.typo3.org

tl;dr

composer req praetorius/vite-asset-collector
npm install --save-dev vite vite-plugin-typo3
  • Include PlugIn in vite config
  • Add Configuration/ViteEntrypoints.json to extension(s)
  • Add <vite:asset entry="..." /> to template
  • Run vite dev server
  • Have fun!

Discussion & Support

You can join #vite on TYPO3 Slack to discuss anything about vite and TYPO3.

Feel free to contact me directly if you are interested in a (paid) workshop to introduce vite to your TYPO3 projects.

Development

Setup
composer install
Switching TYPO3 version

The extension supports multiple TYPO3 versions. To install the dependencies for a specific version locally (e. g. to run the tests or PHPStan against it), use the same command as CI:

composer update \
    --with typo3/cms-core:^13.4 \
    --with typo3/cms-fluid:^13.4 \
    --with typo3/cms-extbase:^13.4 \
    --with typo3/cms-backend:^13.4 \
    --with typo3/cms-frontend:^13.4 \
    --with typo3/cms-install:^13.4
Tests
composer test
composer test:unit
composer test:functional
composer test:acceptance

Functional and acceptance tests use SQLite, no database server needed.

Acceptance tests use the project in .Build/ as TYPO3 installation in composer mode and render a page with PHP's built-in web server (port 8601, can be changed with the environment variable ACCEPTANCE_PORT). Each run sets up TYPO3 from scratch in config/ and var/ in the repository root.

Code quality
composer lint
composer fix
composer phpstan -- -c Build/CodeQuality/phpstan14.neon

Use the PHPStan configuration that matches the installed TYPO3 version.

Documentation

The documentation in Documentation/ is rendered with Docker:

docker run --rm -v $(pwd):/project ghcr.io/typo3-documentation/render-guides:latest --config=Documentation

The output is written to Documentation-GENERATED-temp/. CI fails on any rendering warning.

After changing ViewHelper arguments or docblocks, regenerate the ViewHelper reference:

composer doc:viewhelpers
Release workflow

Releases are published to GitHub and TER by GitHub Actions. Packagist picks up new tags automatically.

  1. Update the version in composer.json and ext_emconf.php, then commit and push the change:
    composer set-version 2.1.0
    For pre-releases (e. g. 2.1.0-rc1), set the version in both files manually.
  2. Run the prepare release workflow on main, entering the version (and checking "Pre-release" if applicable). It verifies the versions in both files and creates a draft release with generated release notes and the TER ZIP file attached (assets of immutable releases can't be changed after publishing).
  3. Edit the release notes of the draft and publish it. This creates the tag. The publish workflow then uploads the attached ZIP file to TER (except pre-releases), using the release notes as upload comment.

Publishing to TER requires the repository secret TYPO3_API_TOKEN (created at extensions.typo3.org with the scopes extension:read,extension:write). If the upload fails, re-run the failed jobs in the Actions tab instead of publishing the release again.