extraFiles not working?

I am trying out firebase (web version), I have a JavaScript script module file (type=”module”) i need to add to the project, I’ve put it in my Project folder > new folder named “scripts”.

In extraFiles I have:

images
scripts

In extraFiles i also tried:

images,scripts

And i tried swapping them round:

scripts,images

Also in extraHeaders i have:
<script type="module" src="scripts/firebaseConfig.js"></script>

In the config, i also tried:

<hook type="after_build" src="scripts/firebaseConfig.js" />

When testing in the browser all works as expected, however, when I build an iOS app with VoltBuilder (not tested Android yet) the scripts folder is not being added to the project but the images folder is.

Am i doing something wrong?

Just as a note, i can’t just copy it to the Project Explorer window because it needs to be specified as a module file, (i tired it and got errors: import must be inside a module).

I found a workaround.

In extraHeaders i put:

<script type="module" >

// js code here

</script>
1 Like