-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support ESM projects #914
Comments
Temporary fix: import { icon } from '@heroicons/react/24/outline/esm/index.js' |
Hey! Can you provide a minimal reproduction for this as a Git repo? This should work, as we do ship an ESM version, which you can see in the package.json file: https://unpkg.com/browse/@heroicons/[email protected]/24/solid/package.json You can also see the ESM versions of the icons here: https://unpkg.com/browse/@heroicons/[email protected]/24/solid/esm/ So I suspect this probably has something to do with your particular project setup, which is why the minimal reproduction is important 👍 Thanks! |
Hey! I've merged a change in #920 that should enable this to work. Bare ESM requires the use of extensions unless a package provides an exports field with what amounts to an import map. It will be available in our next tagged release (possibly today but if not it will happen this week). |
cannot use in SSR + ESM environment
The text was updated successfully, but these errors were encountered: