H
H
hollanditkzn2017-11-08 16:21:58
JavaScript
hollanditkzn, 2017-11-08 16:21:58

How to use npm plugin?

I have such a question, if I install this plugin in npm https://chmln.github.io/flatpickr/getting-started/ then how can I use it in the project. More precisely, how should I call it at all if I do not have webpack. I only use cdn but don't want to call cdn all the time in my code. Or does npm need webpack?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Kitmanov, 2017-11-08
@hollanditkzn

Well, sometimes you can just write

<script src="./node_modules/plugin/index.js"></script>
, but not the fact that it will burn out with this particular package. Plus, there are still reasons why people stop including scripts manually and use webpack.
If you don't want webpack, you can try rollup, browserify and/or gulp. Although at the moment the easiest way to find help is on webpack.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question