You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Honestly not great, because it means I have to access the different beautifers through the default property, like this:
beautify.default.html()
At minimum, this needs to be added to the README so folks know the correct syntax. Preferably, the code should also be updated to better support ESM import.
The text was updated successfully, but these errors were encountered:
Encountered an issue with ESM support in js-beautify
My ESM browser app had a single AMD dependency (@arcgis/core), and that dependency creates the global define() function.
Even though I am importing js-beautify as ESM, the presence of define() function confuses it into thinking AMD import is desired:
Description
Currently, when I import js-beautifier to an ES module using an
import
statement and then log the object to the console, here's what I see:Honestly not great, because it means I have to access the different beautifers through the
default
property, like this:At minimum, this needs to be added to the README so folks know the correct syntax. Preferably, the code should also be updated to better support ESM import.
The text was updated successfully, but these errors were encountered: