I have a need to output the build versions of select CSS and Javascript files from a site. I have the CSS contents output with craft.vite.inline(craft.vite.entry("file.css")), but attempting to do the same for a corresponding Javascript file nets a return of just the development site base URL when craft.vite.entry("file.js") is called. The docs suggest that craft.vite.entry supports resolving a path to a built Javascript file, unless I'm misinterpreting.
Question
I have a need to output the build versions of select CSS and Javascript files from a site. I have the CSS contents output with
craft.vite.inline(craft.vite.entry("file.css"))
, but attempting to do the same for a corresponding Javascript file nets a return of just the development site base URL whencraft.vite.entry("file.js")
is called. The docs suggest that craft.vite.entry supports resolving a path to a built Javascript file, unless I'm misinterpreting.Additional context
Snippet of my vite.config.js:
Example contents of one of the Typescript files that goes into the rollup config:
Thanks!