Closed pranavelric closed 1 year ago
Sorry for the long delay. It seems this issue is caused by the library not actually exporting any ES modules. I just released guacamole-common-js@1.4.0-b
which contains both a CJS and an ESM export (in dist/cjs
and dist/esm
respectively).
I'm not sure that your use case would work though. Even though the module exports the Guacamole
object, if you simply import the script using an HTML script tag it won't be automatically accessible by any other scripts on the page. For that you'd want to write a separate script with your actual Guacamole logic, such as
<script type="module">
import Guacamole from './path/to/guacamole-common.min';
const client = Guacamole.Client(...);
</script>
We are using guacamole-common-js in one of our projects and using guacamole-common.min.js in the script results in a module not found error:
<script type="text/javascript" src="guacamole-common.min.js"></script>
I am using
guacamole-common.js: 1.4.0-a