Closed rockwelln closed 6 years ago
Hello! First, sorry for the hasty push, because you weren't responding for 1 week, I thought I should push it right away. Turned out it wasn't okay after all. Next time I'll just wait patiently.
I actually didn't test it with projects using CRA. Very well, I'll look into it. From what I have understood from your explanation, will CRA not compile JSX from vendor modules?
Regarding build to separate 'libs', do you mean compiling every file in src/*.js
so they can be used without Babel on imports/requires (ie. A.js
, B.js
, and C.js
are all using ES6/JSX, compiled to a.js
, b.js
, and c.js
which all are in ES5 and doesn't contain any JSX)
If what I think above are true, I'll need to find a way for Webpack to compile per file.
Hey, no problem, I was late to reply, perfectly normal to push your changes (don't wait for me next time).
will CRA not compile JSX from vendor modules
It's my understanding.
Regarding build to separate 'libs', do you mean compiling every file in src/*.js so they can be used without Babel on imports/requires (ie. A.js, B.js, and C.js are all using ES6/JSX, compiled to a.js, b.js, and c.js which all are in ES5 and doesn't contain any JSX)
Correct.
I'll need to find a way for Webpack to compile per file.
I think react-bootstrap (where you can import from /lib/ each sub-component individually) can be a starter.
Alright, cool! I'll try to fix this ASAP
Hello, could you see and check my PR #14 when you have time? Just to make sure the solution is working in general, not just for me ;) thanks!
Great, your patch works fine to me :-). Thank you and happy new year!!!
That's great to know! :D You're welcome and happy new year too! Will merge this later in the day.
Hello, I didn't had the chance to test the last big changes earlier. I tried to update this morning and had the surprise to see the sources to import to customize the table contains JSX syntax, which is fine in some cases but if CRA is used, the build fails with, for example:
I think, it would be better to compile/distribute those sources into 'lib's like it is done in react-bootstrap project (see https://github.com/react-bootstrap/react-bootstrap/blob/master/tools/lib/build.js)