.. _connect-typo3: ========================== Connect the build to TYPO3 ========================== Add the connector Site Set to the site's active Site Set dependencies. Keep the dependencies the sitepackage already needs: .. code-block:: yaml :caption: packages/my_sitepackage/Configuration/Sets/Sitepackage/config.yaml name: vendor/my-sitepackage dependencies: - skom/stylex-connector For TYPO3 12 or a site without Site Sets, import the connector's supplied TypoScript setup and constants in the sitepackage instead: .. code-block:: typoscript @import 'EXT:stylex_connector/Configuration/TypoScript/setup.typoscript' @import 'EXT:stylex_connector/Configuration/TypoScript/constants.typoscript' Neither Site Sets nor TypoScript generate the StyleX manifest. Register the exact output path configured in :doc:`Vite` from the sitepackage: .. code-block:: php :caption: packages/my_sitepackage/ext_localconf.php Keep the site's existing layout structure. Remove any older inclusion of the same built CSS or JavaScript so each asset loads once. The asset collector uses the Vite development server when available and the built manifest in production. With this delivery path, leave ``StylexConnector.includeCssViaTypoScript`` disabled. If another asset system already serves the build, keep that system and register the StyleX manifest the same way. See :ref:`css-delivery-settings` for the optional prebuilt CSS include and the full settings reference. Use a manifest key ================== Once Vite has written the manifest, a Fluid template can resolve its keys: .. code-block:: html The ViewHelper writes classes; the page's asset include supplies their CSS. Continue with :doc:`Verify`, then see :ref:`using-the-viewhelper` for conditional styles and key composition.