Lucifier129 / react-lite

An implementation of React v15.x that optimizes for small script size
MIT License
1.73k stars 98 forks source link

not work with react-boilerplate? #77

Closed mydearxym closed 7 years ago

mydearxym commented 7 years ago

amazing work !

i use react-lite with react-boilerplate , it did shrink the build size, but got this error in brower (regular react works fine):

image

webpack config

Reproduce:

check out a demo for this issue if you have time, then npm install && npm run build && cd ./build

Lucifier129 commented 7 years ago

I will check it as soon;-)

Lucifier129 commented 7 years ago

This line cause the problem, remove it and re-build, react-boilerplate works well in my machine.

react-lite can't work with transform-react-inline-elements, you will get a bundle include both react and react-lite.

mydearxym commented 7 years ago

it worked! thanks for point out that .

but according to transform-react-inline-elements doc, this plugin :

Replaces the React.createElement function with a more optimized one for production...

i wonder it's this more optimized one for production matters ?

Lucifier129 commented 7 years ago

I do'nt think it matters, but you can switch react/react-lite to see the different and feel free to make you own choice.

mydearxym commented 7 years ago

thanks @Lucifier129

and i suggest add this babel limitation to readme or doc

Lucifier129 commented 7 years ago

Yeah, I done it yesterday. Click here and see the last one.

mydearxym commented 7 years ago

cool 👍