Creating my own html template as an extension

Hello, I have written my own html template and I want to use it as an extension. But the thing is that I have a link to a js script file in my html template and I don’t know how to include it in the bundle. I know it can be specified as bundle resource, but I want the user to connect this extension without any extra steps. Is there any way to make it so that the file is in the bundle? Or embedded like css in html?

You could manually copy the contents of the JavaScript file and paste it into the HTML between an open and close script tag.

<script>console.log('hello world')</script>

Is there something about this approach that doesn’t fit your needs?

Thanks for the advice. I wanted to make the html template more lightweight. But this approach is fine with me too :slightly_smiling_face:

I hasn’t tried but I see some extensions (e.g Facebook) putting theirs js file into /lib/web

Yes, I think @Chung_Xa is right. Here’s the relevant part from the manual that explains the folder structure: Native extensions project layout