CDN: Uncaught SyntaxError: Unexpected token 'export' (at lite-youtube.js:1:1)
Juc1 opened this issue · comments
I am using the CDN - my HTML page source has
<lite-youtube videoid="guJLfqTFfIw"></lite-youtube>
<script src="https://cdn.jsdelivr.net/npm/@justinribeiro/lite-youtube@1.5.0/lite-youtube.js"></script>
but no video is rendered and console has error
Uncaught SyntaxError: Unexpected token 'export' (at lite-youtube.js:1:1)
Any ideas please?
You're missing the the type=module on the script tag:
<script type="module" src="https://cdn.jsdelivr.net/npm/@justinribeiro/lite-youtube@1.5.0/lite-youtube.js"></script>
Ok fixed, thank you :)
@justinribeiro my SEO audit tool semrush is complaining that the CDN link is not minified - would it be possible for you to add a minified version to the CDN?