You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to implement the TTS audio feature request, but it is a bit more complex as I thought. Thought it to be a fun thing to implement during the Christmas madness, but that doesn't seem to be the case unfortunately...
Seems the Web Speech API has some serious cross-browser issues, as I experienced already after a couple of minutes...
To avoid having to solve all that cross-browser stuff myself, I wanted to use the easy-speech npm library. So I added it to the devdependencies in the package.json file.
However I do not only need to use that library in my vue frontend code (via the build), but also in the ui-audio node config screen (to show a list of the supported voices).
To use that library in the html config screen, I need to download the file from the resources folder (see explanation).
To have the file in the resources folder, I added the following to the vite.config.ts file:
However an npm run build throws an error "vite-plugin-static-copy" resolved to an ESM file. ESM file cannot be loaded by require.
Found an explanation of the problem here. But that would mean we use a commonJs version of Vite?
So here I am stuck. I don't understand how we can use import statements in the vite.config.js file for other modules in that case. And "if" we use the commonjs version of Vite, that seems to be deprecated in Vite version 6. Currently we use 5.x
Would really appreciate if somebody could illuminate me about what is the best way to solve this.
Thanks!
Bart
The text was updated successfully, but these errors were encountered:
Hi guys,
I wanted to implement the TTS audio feature request, but it is a bit more complex as I thought. Thought it to be a fun thing to implement during the Christmas madness, but that doesn't seem to be the case unfortunately...
resources
folder (see explanation).npm run build
throws an error"vite-plugin-static-copy" resolved to an ESM file. ESM file cannot be loaded by require
.So here I am stuck. I don't understand how we can use
import
statements in the vite.config.js file for other modules in that case. And "if" we use the commonjs version of Vite, that seems to be deprecated in Vite version 6. Currently we use 5.xWould really appreciate if somebody could illuminate me about what is the best way to solve this.
Thanks!
Bart
The text was updated successfully, but these errors were encountered: