imballinst / react-bs-datatable

Bootstrap datatable without jQuery. Features include: filter, sort, pagination, checkbox, and control customization.
https://imballinst.github.io/react-bs-datatable
MIT License
59 stars 20 forks source link

Fix/jsx in lib #14

Closed imballinst closed 6 years ago

imballinst commented 6 years ago

Fixed issue #13 from @NormanDenayer

How I fixed it:

  1. I added "build:lib": "cd src && babel . --out-dir ../lib --ignore test.js"
  2. The script will be run on npm run build
  3. The components can be imported from the lib folder (not src)

To try it:

  1. Install react-bs-datatable but from my branch: npm install https://github.com/Imballinst/react-bs-datatable#fix/jsx-in-lib --save
  2. Change your import from react-bs-datatable/src to react-bs-datatable/lib

Tried it on CRA and non-CRA app (both works). Please don't hesitate if you are still experiencing the bug.