alexlafroscia / ember-react-components

Render React components in Ember
https://alexlafroscia.github.io/ember-react-components
MIT License
52 stars 16 forks source link

Load development build of React #46

Closed rps-v closed 4 years ago

rps-v commented 4 years ago

Hello,

Is it possible to load the development build of React instead of the production one ?

Tried to set alias via ember-auto-import but it did not work.

autoImport: {
    alias: {
        react: 'react/cjs/react.development'
    }
}

Am I missing something ?

alexlafroscia commented 4 years ago

I don't think you're missing anything... that's how I would suggest to set that up.

Is the cjs build the correct one? Does it want an ESM build instead? I'm not sure what it uses by default

rps-v commented 4 years ago

It uses the cjs build. I opened a related issue for ember-auto-import and the conclusion was that an addon used in the app is changing the NODE_ENV to production even though the build is started for development. I added this addon in a new project and the development build is correctly loaded. If I find the problematic addon I will reply here.

Thanks for the help !