question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[ESM] No ES module export?

See original GitHub issue

We’re using Vite for builds and it only supports ESM exports (and a very thin CJS compatibility)…

Since we’re going to attempt to use Tailwind to style Litepicker, we need to disable the native CSS. The window approach isn’t working as far as we can tell.

Anyway, we would use the “nocss” module but that one fails with Vite since it’s a nested file.

All would be solved if we could just import the ESM module directly but it looks like you only UMD and CJS builds.

(If you’re using Rollup adding ESM should be a simple fix.)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
wakirincommented, Feb 3, 2021

Perhaps the next major release will be target to ES6 (Of course, it won’t be soon). But I am not ready to change that at this time.

Thanks for the suggestion.

0reactions
rschristiancommented, Feb 23, 2021

@wakirin

Oh, nothing’s “wrong” with it, but Microbundle only minimally processes CSS. A standalone CSS pipeline would needed with what you currently have.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ECMAScript modules | Node.js v19.3.0 Documentation
No require , exports , or module.exports #. In most cases, the ES module import can be used to load CommonJS modules. If...
Read more >
ESM export * except from module - javascript - Stack Overflow
And it is a typescript construct and not available when writing vanilla JS. Is there a way to archive this using ESM import...
Read more >
export - JavaScript - MDN Web Docs
The export declaration is used to export values from a JavaScript module. Exported values can then be imported into other programs with the ......
Read more >
Getting Started with (and Surviving) Node.js ESM
js' ESM support is not ESM itself, but rather the new exports field in package.json , which applies to both CommonJS and ESM...
Read more >
Error: ES Modules may not assign module.exports or ... - GitHub
Bug Report Error: ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: 581 Current behavior Error: ES ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found