simple-keyboard-layouts icon indicating copy to clipboard operation
simple-keyboard-layouts copied to clipboard

Unable to dynamically import individual layouts in node.js

Open slangreck opened this issue 8 months ago • 0 comments

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?

slangreck avatar Jun 28 '24 13:06 slangreck