Auto publish/export local external js assets

let’s say I link external js module:

  • local
  • bundled(constantly changing during dev)
  • served in a dev server in localhost (say it’s vite)

on bss preview, that’s easy, I just need to link it to the link to served file in the dev server.
but, currently if I want to use it in the export/publish, I need to import JS it in bss.
which is kinda repetitive if you need to use the publish/export site as a test/preview site(to your client).
well I mean, I can just put it as the CDN somewhere… but in this scenario let’s say I want to host the file inside bss published website…

feature request/idea

when specific condition are met, let’s say
image

when URL field is filled with absolute path to local valid js/mjs file(or perhaps assets like css/scss),
it’ll be nice if:

  • on export/publish:
  • bss include the file to the target export/publish path;
  • perhaps on /assets/auto/${uniqueName}${extention} and load it with ?v=${Date.now()} for force versioning;
  • I mean it’s constantly changing external file, I think it’s fine to just force the client to load the newest every new publish/export is generated, and try to track it with bss internal would be unneccessary;
  • on bss preview:
  • bss might serves it using base64 like:
scriptElement.src= `data:text/javascript;base64,${base64Module}`

thx as allways @martin