Project

General

Profile

Feature #97652 » f_asset-js-concatenated-and-single-inline-only-poc.html

Refer to multiple JS files and have their content rendered inline combined to a single script block. - Jan Loderhose, 2022-05-20 09:20

 
<!--
Refer to multiple JS files and have their content rendered inline combined to a single script block.
-->

<!--
/* example.js BEGIN */
console.log('ding');
/* example.js END */
-->

<!--
/* example2.js BEGIN */
consol.log('dong');
/* example2.js END */
-->

<!--
/* ViewHelpers BEGIN */
<f:asset.js identifier="example" href="/path-to/example.js" inline="true" concatenate="true" />
<f:asset.js identifier="example2" href="/path-to/example2.js" inline="true" concatenate="true" />
/* ViewHelpers END */
-->

<!-- RESULT -->
<!DOCTYPE html>
<html>

<head></head>

<body>
...
<script>
console.log('ding');
console.log('dong');
</script>
</body>

</html>
(4-4/6)