scup / atellier

The smartest way to share interactive components with your team.
http://scup.github.io/atellier/
MIT License
995 stars 33 forks source link

Package should not be published with React bundled to avoid errors relative to multiple versions of React being present in the final bundle #33

Open PCreations opened 8 years ago

PCreations commented 8 years ago

In the webpack config, the following option should be added to avoid bundling react with this package : externals: { 'react': 'react', 'react-dom': 'react-dom' }, This fixes the issue relative to multiple version of React such as 'Only a ReactOwner can have refs' (see #32)

btzsoft commented 8 years ago

The issue with 'Only a ReactOwner can have refs' is because of multiple packages of React. Bundle dist/react-atellier.js should be bundled without React inside.

As temporary solution (if you use webpack in your project), you can copy source files and webpack configs from atellier and import directly in your project.

More description about this issue found here

sompylasar commented 8 years ago

Fixed via https://github.com/sompylasar/atellier/commit/034164ba1016eb342f000d3ca94dd301e4a9bf1b

agutoli commented 8 years ago

@PCreations Can we close this issue?

PCreations commented 8 years ago

If it has been fixed, yes, sure :)

sompylasar commented 8 years ago

@PCreations please check if it has been fixed for you.