{"viewHelpers":{"asset":{"className":"Praetorius\\ViteAssetCollector\\ViewHelpers\\AssetViewHelper","namespace":"Praetorius\\ViteAssetCollector\\ViewHelpers","name":"AssetViewHelper","tagName":"asset","documentation":"The `vite:asset` ViewHelper embeds all JavaScript and CSS belonging to the\nspecified vite `entry` using TYPO3's AssetCollector API.\n\nExample\n=======\n\n..  code-block:: html\n\n    <html\n        data-namespace-typo3-fluid=\"true\"\n        xmlns:vite=\"http:\/\/typo3.org\/ns\/Praetorius\/ViteAssetCollector\/ViewHelpers\"\n    >\n\n    <vite:asset\n        entry=\"EXT:sitepackage\/Resources\/Private\/JavaScript\/Main.entry.js\"\n    \/>\n\nAdvanced Example\n================\n\n..  code-block:: html\n\n    <html\n        data-namespace-typo3-fluid=\"true\"\n        xmlns:vite=\"http:\/\/typo3.org\/ns\/Praetorius\/ViteAssetCollector\/ViewHelpers\"\n    >\n\n    <vite:asset\n        manifest=\"EXT:sitepackage\/Resources\/Public\/Vite\/.vite\/manifest.json\"\n        entry=\"EXT:sitepackage\/Resources\/Private\/JavaScript\/Main.entry.js\"\n        scriptTagAttributes=\"{\n            type: 'text\/javascript',\n            async: 1\n        }\"\n        cssTagAttributes=\"{\n            media: 'print'\n        }\"\n        priority=\"1\"\n    \/>","xmlNamespace":"http:\/\/typo3.org\/ns\/Praetorius\/ViteAssetCollector\/ViewHelpers","docTags":[],"argumentDefinitions":{"manifest":{"name":"manifest","type":"string","description":"Path to your manifest.json file. If omitted, default manifest from extension configuration will be used instead.","required":false,"defaultValue":null,"escape":null},"entry":{"name":"entry","type":"string","description":"Identifier of the desired vite entrypoint; this is the value specified as \"input\" in the vite configuration file. Can be omitted if manifest file exists and only one entrypoint is present.","required":false,"defaultValue":null,"escape":null},"devTagAttributes":{"name":"devTagAttributes","type":"array","description":"HTML attributes that should be added to script tags that point to the vite dev server","required":false,"defaultValue":[],"escape":null},"scriptTagAttributes":{"name":"scriptTagAttributes","type":"array","description":"HTML attributes that should be added to script tags for built JavaScript assets","required":false,"defaultValue":[],"escape":null},"addCss":{"name":"addCss","type":"boolean","description":"If set to \"false\", CSS files associated with the entry point won't be added to the asset collector","required":false,"defaultValue":true,"escape":null},"cssTagAttributes":{"name":"cssTagAttributes","type":"array","description":"Additional attributes for css link tags.","required":false,"defaultValue":[],"escape":null},"priority":{"name":"priority","type":"boolean","description":"Include assets before other assets in HTML","required":false,"defaultValue":false,"escape":null},"useNonce":{"name":"useNonce","type":"bool","description":"Whether to use the global nonce value","required":false,"defaultValue":false,"escape":null}},"allowsArbitraryArguments":false,"nameWithoutSuffix":"Asset","namespaceWithoutSuffix":"Praetorius\\ViteAssetCollector","uri":"ViteAssetCollector\/Asset"},"uri":{"className":"Praetorius\\ViteAssetCollector\\ViewHelpers\\UriViewHelper","namespace":"Praetorius\\ViteAssetCollector\\ViewHelpers","name":"UriViewHelper","tagName":"uri","documentation":"The `vite:uri` ViewHelper extracts the uri to one specific asset file from a vite\nmanifest file. If the dev server is used, the dev server uri to the resource is returned.\n\nExample\n=======\n\nThis can be used to preload certain assets in the HTML `<head>` tag.\n\nSolution for TYPO3 v14+\n-----------------------\n\n..  code-block:: html\n    <f:page.headerData>\n        <link\n            rel=\"preload\"\n            href=\"{vite:uri(file: 'EXT:sitepackage\/Resources\/Private\/Fonts\/webfont.woff2')}\"\n            as=\"font\"\n            type=\"font\/woff2\"\n            crossorigin\n        \/>\n    <\/f:page.headerData>\n\nSolution for TYPO3 v13\n----------------------\n\nFirst, add a Fluid template to your TypoScript setup, for example:\n\n..  code-block:: typoscript\n\n    page.headerData {\n        10 = FLUIDTEMPLATE\n        10 {\n            file = EXT:sitepackage\/Resources\/Private\/Templates\/HeaderData.html\n        }\n    }\n\nThen create the HeaderData template:\n\n..  code-block:: html\n    :caption: EXT:sitepackage\/Resources\/Private\/Templates\/HeaderData.html\n\n    <html\n        data-namespace-typo3-fluid=\"true\"\n        xmlns:vite=\"http:\/\/typo3.org\/ns\/Praetorius\/ViteAssetCollector\/ViewHelpers\"\n    >\n\n    <link\n        rel=\"preload\"\n        href=\"{vite:uri(file: 'EXT:sitepackage\/Resources\/Private\/Fonts\/webfont.woff2')}\"\n        as=\"font\"\n        type=\"font\/woff2\"\n        crossorigin\n    \/>\n\n    <\/html>","xmlNamespace":"http:\/\/typo3.org\/ns\/Praetorius\/ViteAssetCollector\/ViewHelpers","docTags":[],"argumentDefinitions":{"manifest":{"name":"manifest","type":"string","description":"Path to vite manifest file; if omitted, default manifest from extension configuration will be used instead","required":false,"defaultValue":null,"escape":null},"file":{"name":"file","type":"string","description":"Identifier of the desired asset file for which a uri should be generated","required":true,"defaultValue":null,"escape":null}},"allowsArbitraryArguments":false,"nameWithoutSuffix":"Uri","namespaceWithoutSuffix":"Praetorius\\ViteAssetCollector","uri":"ViteAssetCollector\/Uri"}},"uri":"ViteAssetCollector\/Index","name":"ViteAssetCollector","label":"ViteAssetCollector","namespaceAlias":"vite","targetNamespace":"http:\/\/typo3.org\/ns\/Praetorius\/ViteAssetCollector\/ViewHelpers","includesNamespaces":["http:\/\/typo3.org\/ns\/Praetorius\/ViteAssetCollector\/ViewHelpers"],"sourceEdit":null,"headlineIdentifierPrefix":null}