esm.sh icon indicating copy to clipboard operation
esm.sh copied to clipboard

Failed to import - primereact (alias cannot contain slashes)

Open kyjus25 opened this issue 1 year ago • 2 comments

Attempting to use PrimeReact in a Fresh Deno project which uses preact/compat

Failing module

  • GitHub: https://github.com/primefaces/primereact
  • npm: https://npmjs.com/package/primereact
"imports": {
  ...
  "primereact/": "https://esm.sh/[email protected]&alias=react:preact/compat,react-dom:preact/compat&external=preact/"
}
import { Button } from "primereact/button"

Error message

After onload I got this:

Module not found

Import path works if I change preact/compat to not have a slash, but this is of course not the proper alias

https://preactjs.com/guide/v10/getting-started#aliasing-react-to-preact

Additional info

  • Browser version: Brave v1.61.104 (Chromium)

Full disclosure I also may be doing this completely wrong.

kyjus25 avatar Jan 23 '24 18:01 kyjus25

supposed to work, seems it's a bug of the recent update, i will look into it

ije avatar Jan 23 '24 19:01 ije

@ije Thank you for quick reply 🙏 Appreciate any assistance

kyjus25 avatar Jan 23 '24 19:01 kyjus25