Fix package.json to enable importmap pin
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
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?