![]() ![]() I would expect in 2021, what with widespread ESM browser support, that this would just work, but I've tried 5 different date-time libraries and had no success. The requested module 'blah' does not provide an export named 'default'Ĭannot set property 'moment' of undefined (at moment.js:10)Īnd leaves me stuck with loading the other modules its dependent upon, because I guess, their file extensions are missing.Īfter 3 days tearing my hair out I feel like I have been fighting a battle I shouldn't be attempting at all. Contribute to ffha/unpkg development by creating an account on GitHub. Moment provides its own type definitions, so you dont need types/moment installed. This gets me past a couple of errors I was getting: Contribute to ffha/unpkg development by creating an account on GitHub. unpkg is a free, best-effort service and cannot provide any uptime or support guarantees. So I'm referencing that "source" version in my transpiled JS module. I've discovered that the moment package contains what looks like "source" code in its src folder which seems to look more like the JS/TS I'm accustomed to, and has a "default export" at the bottom. This is a pretty amazing service to offer for free. unpkg partners with cloudfare and heroku to make this automatic distributing possible. My module is itself loaded via an import from a tag, which works. The ultimate goal is, your
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |