halfmoonui / halfmoon

Halfmoon is a highly customizable, drop-in Bootstrap replacement. It comes with three built-in core themes, with dark mode support for all themes and components.
https://www.gethalfmoon.com
MIT License
3.01k stars 118 forks source link

`Uncaught ReferenceError: module is not defined` when importing halfmoon-module.js #109

Open OvermindDL1 opened 3 years ago

OvermindDL1 commented 3 years ago

It looks like halfmoon-module.js is not actually a mobule, it instead seems to be trying to lookup a module in its global scope, which doesn't exist.

Seems this may be a CommonJS file perhaps, but its not a module, so is the file misnamed or is import'ing it not actually the right way from a javascript module, and if not then how is it supposed to be imported into a javascript module?

OvermindDL1 commented 3 years ago

For note, replacing module.exports = halfmoon; with export default halfmoon; was sufficient enough for me to use it, if not correct (since it just put everything in the default export as an object instead of as their own individual imports).