shakacode / old-react-on-rails-examples

Various example apps for React on Rails, outdated
1 stars 0 forks source link

Rough edges #24

Closed Judahmeek closed 7 years ago

Judahmeek commented 7 years ago

Before merging, we've got a puzzle to solve. 17f1e26 results in

Uncaught TypeError: Cannot set property 'emulateTransitionEnd' of undefined
    at setTransitionEndSupport (webpack:///./\~/bootstrap/js/dist/util.js?./\~/exports-loader?Util:88)
    at eval (webpack:///./\~/bootstrap/js/dist/util.js?./\~/exports-loader?Util:146)
    at Object.eval (webpack:///./\~/bootstrap/js/dist/util.js?./\~/exports-loader?Util:149)
    at eval (webpack:///./\~/bootstrap/js/dist/util.js?./\~/exports-loader?Util:155)
    at Object../node_modules/exports-loader/index.js?Util!./node_modules/bootstrap/js/dist/util.js (vendor-client-bundle.js:5770)
    at \_\_webpack_require\_\_ (vendor-client-bundle.js:692)
    at fn (vendor-client-bundle.js:111)
    at eval (webpack:///./~/bootstrap/js/dist/alert.js?:185)
    at Object../node_modules/bootstrap/js/dist/alert.js (vendor-client-bundle.js:922)
    at \_\_webpack_require\_\_ (vendor-client-bundle.js:692)

which doesn't make any sense to me considering that there are no updates to any dependencies and this error is apparently Bootstrap Utils complaining that $ is not defined, even though I'm having a hard time estimating what code I added could possibly be using jquery or bootstrap utils.

robwise commented 7 years ago

My guess is that something with adding hot loader screwed up the bundles in such a way that jQuery is no longer getting loaded into the global namespace. This project uses the bootstrap loader and bootstrap expects jQuery to just already exist and be present on the window as $

Judahmeek commented 7 years ago

Removing ifHmr(new webpack.NamedModulesPlugin()), from set-plugins.js solved this error. Now I've just got to get the todoListStore to actually hydrate.

Judahmeek commented 7 years ago

Closing this PR since we decided not to add RHL to the project due to its unreliability and incompatibility with flexbox.