ekwoka / alpine-plugins

Mono repo for various Alpine plugin packages
8 stars 2 forks source link

Not common js or esm error when building in Astro #4

Open josh-tt opened 1 year ago

josh-tt commented 1 year ago

Hi Eric, just getting around finally to test the new update and am currently using Astro. When importing the plugin I got an error about the file not being common js or esm. Adding type: module and changing the entry to .mjs fixed the error, though I'm honestly not sure if that was the right thing to do or what issues it might cause. Just thought I'd mention in case it was an oversight in your package.json

"main": "src/index.mjs", "type": "module",

ekwoka commented 1 year ago

Does look like they're missing that info.

Just the type and an exports key being added should solve them. The package.json are old :(