Skip to content

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

@hrishikesh-k

Description

@hrishikesh-k

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions