Make React / ReactDOM a peer dep.
Closed this issue · 1 comments
cc @mcMickJuice
Currently enclave installs React and ReactDOM as dependencies of itself. This is an issue because enclave doesn't use these dependencies, the user does.
This also breaks enclave on certain environments because there is no React dependency in your package.json
when you make a new enclave project.
What should happen instead is the postinstall
script in enclave should insert the React and ReactDOM as dependencies in the user's package.json
.
Currently if you make a new enclave project your deps look like this:
"dependencies": {
"enclave": "^0.8.8"
}
It should be:
"dependencies": {
"enclave": "^0.8.8",
"react": "^0.14.7",
"react-dom": "^0.14.7"
}
We could insert those dependencies the same way we do it with inserting the start script, but that could pose a lot of problems, like if people already have installed react.
What I would do is just in the postinstall run $ npm i -S react react-dom
so that the user has those deps, I would also remove them as deps to enclave.
Closing due to ignorance.