bootstrap.native icon indicating copy to clipboard operation
bootstrap.native copied to clipboard

ESM default export missing

Open verheyenkoen opened this issue 1 year ago • 3 comments

The How to use wiki demonstrates this example on how to import BSN in an ESM type project.

import BSN from "bootstrap.native";

let myBtnInit = new BSN.Button('#myBtnID');

This doesn't work for me (at least not using esbuild) as there doesn't seem to be a default export. This can be fixed using the * as BSN syntax (but that cannot be combined with named imports).

import * as BSN from "bootstrap.native";

let myBtnInit = new BSN.Button('#myBtnID');

I guess it might be better to provide it as a default export as well, or if not update the examples (unless this is a pure esbuild issue).

verheyenkoen avatar Jul 26 '24 06:07 verheyenkoen