Webpack : how to include the swiper.css int the bundle.js -


i begin webpack.

i use swiper library webpack.

while have no problem use js part, can't find way include , use css part. test severals require syntax none works:

require("swiper/dist/swiper.css"); require("swiper.css"); 

is possible ? there trick ?

$ npm install swiper --save

// include css:

import 'style!css!swiper/dist/css/swiper.css';

// include js

import 'swiper';

the reason not working before style, css, sass loaders set exclude node_modules folder or set include folders.


Comments