Install the extension and asset dependencies
First make sure the sitepackage is installed as a Composer package of type
typo3-. Its page layout must already render in TYPO3. A local
package under packages/ can use a Composer path repository. The project
must require that package so EXT: paths resolve.
Install the connector from the TYPO3 project root:
composer require skom/stylex-connector
vendor/bin/typo3 extension:activate stylex_connector
The composer require command requires the package to be registered on
Packagist. Before that registration, add
https:// as a Composer VCS repository
and require skom/ in a test project.
Run the activation command only if TYPO3 has not already activated the
extension. If the sitepackage uses connector classes, declare
skom/ in the sitepackage's composer. as well.
This guide uses praetorius/ to serve the Vite build
in development and production:
composer require praetorius/vite-asset-collector
The collector is an asset-delivery choice, not a dependency of the connector. Projects using another asset system can keep it, provided it loads the built CSS and JavaScript once. The connector's optional TypoScript CSS include is described in CSS delivery settings.
Next, configure the build in Vite and asset delivery.