Problem using react-table v7 in rails app #2048
-
Apologies if this is not the correct place for this question. I'm trying to use react-table v7 in a rails application and cannot seem to resolve the error pasted below. I have gotten react-table v7 working outside of a rails app, so I suspect it is likely a webpack or babel configuration issue, but I haven't been able to isolate it further. Any help or pointers would be appreciated. I pushed a repository that reproduces the error here: https://github.com/edsinclair/rails-react-table-test Thanks in advance.
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Not knowing much about |
Beta Was this translation helpful? Give feedback.
-
I am facing the exact issue as well @edsinclair |
Beta Was this translation helpful? Give feedback.
-
Aha. I think I figured it out. @edsinclair @ajaiy I'm pretty sure its because Webpacker compiles node modules by default: https://github.com/rails/webpacker/blob/master/docs/v4-upgrade.md#excluding-node_modules-from-being-transpiled-by-babel-loader Following the guide in that wiki, if you make the following change to https://github.com/edsinclair/rails-react-table-test/blob/master/config/webpack/environment.js it should work?
|
Beta Was this translation helpful? Give feedback.
Aha. I think I figured it out. @edsinclair @ajaiy
I'm pretty sure its because Webpacker compiles node modules by default: https://github.com/rails/webpacker/blob/master/docs/v4-upgrade.md#excluding-node_modules-from-being-transpiled-by-babel-loader
Following the guide in that wiki, if you make the following change to https://github.com/edsinclair/rails-react-table-test/blob/master/config/webpack/environment.js it should work?