Describe the bug
All the imports from "buttplug" are undefined when loading the library with Webpack 5 without transpiling dependencies. An example of the error message shown:
TypeError: buttplug__WEBPACK_IMPORTED_MODULE_4__.buttplugInit is not a function
Upon console.log'ing any import from "buttplug", it is undefined.
This behavior has been exhibited in freshly-created Vue 3 / and Next.js projects.
Expected behavior
Importing from "buttplug" should be defined.
Actual behavior
Error: TypeError: buttplug__WEBPACK_IMPORTED_MODULE_4__.buttplugInit is not a function
None of the imports are defined.
Additional context
This issue happens from "buttplug" version 1.0.15 onwards.
The same behaviour happens also when importing through these methods:
const { buttplugInit } = await import('buttplug');
import * as Buttplug from "buttplug";
Describe the bug All the imports from "buttplug" are undefined when loading the library with Webpack 5 without transpiling dependencies. An example of the error message shown:
TypeError: buttplug__WEBPACK_IMPORTED_MODULE_4__.buttplugInit is not a function
Upon console.log'ing any import from "buttplug", it isundefined
. This behavior has been exhibited in freshly-created Vue 3 / and Next.js projects.Expected behavior Importing from "buttplug" should be defined.
Actual behavior Error:
TypeError: buttplug__WEBPACK_IMPORTED_MODULE_4__.buttplugInit is not a function
None of the imports are defined.Additional context This issue happens from "buttplug" version
1.0.15
onwards. The same behaviour happens also when importing through these methods:An example of this happening can be seen here: https://github.com/jy1263/buzzy-vue/tree/latest-buttplug It's interesting that
window.Buttplug
is defined with everything in it though.