appbaseio / reactivesearch

Search UI components for React and Vue
https://opensource.appbase.io/reactivesearch
Apache License 2.0
4.89k stars 468 forks source link

Module parse failed node_modules/rheostat/src/Slider.jsx #289

Closed alankar-anand closed 6 years ago

alankar-anand commented 6 years ago

Issue Type: bug Platform: Web Description: When trying to use reactivebase in my project I get this error.

You may need an appropriate loader to handle this file type.

| class Button extends React.Component {
|   render() {
|     return <button {...this.props} type="button" />;
|   }
| }
    at eval (Slider.jsx:1)
    at Object../node_modules/rheostat/src/Slider.jsx (reactBoilerplateDeps.dll.js:23162)
    at __webpack_require__ (reactBoilerplateDeps.dll.js:21)
    at eval (RangeSlider.js:17)
    at Object../node_modules/@appbaseio/reactivesearch/lib/components/range/RangeSlider.js (reactBoilerplateDeps.dll.js:535)
    at __webpack_require__ (reactBoilerplateDeps.dll.js:21)
    at eval (index.js:86)
    at Object../node_modules/@appbaseio/reactivesearch/lib/index.js (reactBoilerplateDeps.dll.js:679)
    at __webpack_require__ (reactBoilerplateDeps.dll.js:21)
    at eval (index.js from dll-reference reactBoilerplateDeps?5e4a:1)

I'm using React Boilerplate. The issue and possible solution can be found under rheostat github issues: https://github.com/airbnb/rheostat/issues/98

Minimal reproduction of the problem with instructions: I installed the project using the following docs: https://opensource.appbase.io/reactive-manual/getting-started/reactivesearch.html#step-0-install-reactivesearch

Reactivesearch version: 2.3.2

Browser: Version 64.0.3282.186 (Official Build) (64-bit)

divyanshu013 commented 6 years ago

Hi @alankar-anand, it seems like an issue with webpack config of react-boilerplate with handling .jsx file. You may try this example from the repo where we already have a sample webpack config.

alankar-anand commented 6 years ago

Hi @divyanshu013, Is it possible to use reactivesearch with react-boilerplate ?

divyanshu013 commented 6 years ago

I think it should be possible. You might need to play around with the webpack settings react-boilerplate comes by default. In the example repo we are using this webpack config. Can you check if it works?

divyanshu013 commented 6 years ago

Hey @alankar-anand we're now using the commonjs module for rheostat from /lib/Slider. This will be out in the next patch release v2.3.3 shortly.