herbsjs / herbs

A domain-first framework. Code your domain and your infrastructure will follow
https://herbsjs.org/
MIT License
426 stars 14 forks source link

Import ES Modules not working for react #10

Open maikvortx opened 2 years ago

maikvortx commented 2 years ago

Hello everyone!

I'm using react 16 with herbs and when I go to import the herbs module I get the herbs.csj file.

To Reproduce

Steps to reproduce the behavior:

  1. Using react 16
  2. Import ES Module from import herbs from '@herbsjs/herbs'
  3. Create a new entity

Expected behavior

Import ES Module with herbs functions like entity, field...

Screenshots

image

italojs commented 2 years ago

@maikvortx do you have some idea how to solve it?

italojs commented 2 years ago

@maikvortx this issue still alive?

maikvortx commented 2 years ago

Hi @italojs! This "bug" is still alive! HAHHAA

I think that we need to use ESM in Herb's packages to work well with React Projects.