Skip to content
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

@appnest/masonry-layout doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module #9

Open
hrishikesh-k opened this issue Feb 22, 2023 · 0 comments · May be fixed by #12

Comments

@hrishikesh-k
Copy link

Hi!

Thank you so much for your work on this library! It works really well!

I've run into a small issue. Till now, I was using this in a Hugo website, but just started converting that into a Astro website. I currently have a very simply component like:

---
---
<masonry-layout>
  <h1>Masonry</h1>
</masonry-layout>
<script>
  import '@appnest/masonry-layout'
</script>

However, the build gives a warning:

@appnest/masonry-layout doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix

Seems like a straightforward change to convert this to a module (by adding the declaration in package.json). So, I've submitted a PR. Let me know if it makes sense!

I didn't find any reference of module field in package.json here: https://docs.npmjs.com/cli/v9/configuring-npm/package-json, so I have simply converted that to "type": "module" instead.

@tpluscode tpluscode linked a pull request Jun 18, 2023 that will close this issue
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 a pull request may close this issue.

1 participant