react-slick: why is the css invalid?
I installed the react-slick and slick-carousel. the below is my part code:
import React from ‘react’; import ReactDOM from ‘react-dom’; import Slider from ‘react-slick’; // import ‘slick-carousel/slick/slick.css’ // import ‘slick-carousel/slick/slick-theme.css’
const slideConfig = { dots: true, infinite: true, speed: 500, slidesToShow: 1, slidesToScroll: 1 }
<Slider {...slideConfig}> <div><h3>1</h3></div> <div><h3>2</h3></div> <div><h3>3</h3></div> <div><h3>4</h3></div> <div><h3>5</h3></div> <div><h3>6</h3></div> </Slider>
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 9
- Comments: 18 (2 by maintainers)
@SlowFamily sure:
First I installed
file-loader
andurl-loader
:Then in my
webpack.config.js
file I configured it like so:That should take care of all the font files and gifs, plus some image files.
you need next.config.js in your root.
add this to your next.config.js
if you use less you can replace
withSass
withconst withLess = require('@zeit/next-less')
also install