simple-keyboard-layouts
simple-keyboard-layouts copied to clipboard
Unable to dynamically import individual layouts in node.js
Simple-keyboard version 3.3.98
Describe the bug When I try to import a layout dynamically, like this:
const { default: imported } = await import(`simple-keyboard-layouts/build/layouts/${configuredLayout}.js`);
I get the error "Unexpected token 'export'".
This can be fixed by adding "type": "module"
to the package.json of the simple-keyboard-layouts package. Or is there another way to dynamically import layouts that I should be using?