Answer the question
In order to leave comments, you need to log in
How to include third party libraries in webpack?
Good day!
Actually, the question is: I'm considering working with webpack. At the very least, jquery connected. But how to include, say, the following: Animate.css
( https://daneden.github.io/animate.css/ ), Particles.js ( https://vincentgarreau.com/particles.js/ ), fullPage.js ( https://alvarotrigo.com/fullPage/ )? What to import in index.js and how to write the path to the required css in styles.scss? Do I need to write something in the config? Maybe I'm dumb and don't get it. I would be grateful for the enlightenment.
Answer the question
In order to leave comments, you need to log in
npm install animate.css --save
And in our root index.js we include:
In the webpack config there should be a loader for css, it looks like this:
{
test: /\.css$/,
use: [
{
loader: 'style-loader'
},
{
loader: 'css-loader',
options: {
sourceMap: true,
},
}
]
},
@import '~bootstrap/scss/bootstrap.scss'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question