Skip to content

Fix package.json to enable importmap pin #17

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

swombat
Copy link

@swombat swombat commented Mar 10, 2025

Hey there!

I love harmony. I love Rails 8! Rails 8 loves importmap. importmap does not love @evilmartians/harmony, because the package.json doesn't include a root

But DHH and others at this comment thread were helpful enough to point me to how to solve this problem. So, here's a pull request that fixes the issue, at least as far as Sonnet 3.7 is telling me (I'm not an importmap or npm expert).

Hope this helps! In the meantime, I will do importmap pin @evilmartians/harmony/base, but it'd be nice to fix this for everyone going forwards :-)

Warm Regards,

Daniel

@psd-coder
Copy link
Member

Hey, thanks for putting this together!

Before moving forward, I want to make sure I fully understand the issue you're hitting. From my side, it looks like using @evilmartians/harmony/base should already work fine with importmap, and I’m not seeing any errors related to the lack of a package root.

Also, /base isn’t really meant to be the main export of the package, so making it the default could be a bit misleading. It's because we have other export targets as well, such as Tailwind 3 and 4 versions, and vanilla CSS.

If there’s a specific setup or error that breaks without this change, could you share more details?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants