You may want to manipulate initial HTML to inject some <link>
s or <script>
s, you can do this with setHead
in saber-browser.js
or head
component option, but that adds bytes to your app runtime, Saber actually has an API that allows you to customize initial HTML.
Open saber-node.js
:
exports.getDocumentData = documentData => {
documentData.bodyScript += `<script>console.log('Run a script after your app code')</script>`
return data
}
This hook is not well documented yet, for now you can check this file for all documentData
properties.