Add JS libraries to project embed code


#1

When I use external JS libraries like VueJS or Moment.js and add the links to the library settings I see a console notice telling me to add it to my <head>, like this:

To improve page speed, add the following to this page's HTML before the closing </head> tag:

<!-- Anymod assets -->
<script defer src="https://cdn.jsdelivr.net/npm/vue"></script>
<script defer src="https://unpkg.com/moment"></script>
<!-- /Anymod assets -->

Why not show this with the project embed script, in the ‘Add to website’ modal? That would give it a lot more visibility and allow more users to benefit from it (those who would miss the console notice).

You could even combine the two, but that wouldn’t work for all users.


#2

Great suggestion! We’ll improve the install instructions and include this :100: