protected function getTag(AssetInfo $assetInfo)
{
if ($assetInfo->getPath()) {
$path = $this->getAssetPath($assetInfo->getPath());
$pubPath = $this->getPublicAssetPath($assetInfo->getPath());
if (file_exists($path)) {
$pubPath .= '?c=' . substr(md5(filemtime($path)), 0, 6);
}
return sprintf('<script type="module" src="%s"></script>', $pubPath);
} else {
return sprintf(<<<EOF
<script type="module">
%s
</script>
EOF
, $assetInfo->getContent());
}
}