Skip to content

Fix package.json to enable importmap pin#17

Open
swombat wants to merge 1 commit intoevilmartians:mainfrom
swombat:main
Open

Fix package.json to enable importmap pin#17
swombat wants to merge 1 commit intoevilmartians:mainfrom
swombat:main

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