Open gilnoy opened 6 years ago
React Slick and Preact works fine with this setup (few days ago I accidentally updated dependencies in my project and everything was broken):
"devDependencies": {
"node-sass": "4.8.3",
"preact-cli": "2.0.0",
"sass-loader": "6.0.7"
},
"dependencies": {
"preact": "8.2.1",
"react-slick": "0.22.3",
"slick-carousel": "1.8.1"
}
I did not go deep into this question, but probably problem with SASS.
Not really...
✖ ERROR ../node_modules/react-slick/lib/utils/innerSliderUtils.js
Module not found: Error: Can't resolve 'react-dom' in '/Users/tomas/WORK/lala/node_modules/react-slick/lib/utils'
@tomasdev do you use preact-compat
?
@drugoi ended up using preact-compat, yes.
I am getting below error while using react-slick with preact 10.x in Server side rendering.
UnhandledPromiseRejectionWarning: Error: Cannot find module 'react-dom'
Require stack:
- /Users/mmt8696/Documents/demo/node_modules/react-slick/lib/inner-slider.js
- /Users/mmt8696/Documents/demo/node_modules/react-slick/lib/slider.js
- /Users/mmt8696/Documents/demo/node_modules/react-slick/lib/index.js
- /Users/mmt8696/Documents/demo/build/server/index.js
My webpack alias configuration is
alias: {
'react': 'preact/compat',
'react-dom': 'preact/compat'
}
No error in console, there is an issue with rendering - seems like a container width\height wrong calculation - i'm using the simple example in demo