How to use NPM Packages in ClojureScript! ClojureScript has recently made great strides to improve their NPM Module (package) support. This video will show you how to configure your project to use NPM modules in a ClojureScript project. We will also provide some additional content to support you in your next steps!
😎 UPDATES
OCTOBER 26, 2020
If you are running this after the official release of webpack 5 (October 10, 2020) then you will get an error in your console when you try to run `clj -M:dev. To resolve this issue please be sure you're using a minimum of figwheel-main version
0.2.12-SNAPSHOT
OCTOBER 08, 2020
As of the latest version of the Clojure CLI Tools, the commands used in this app will still work, but you should prefer:
- clj -M:dev`
⏰Timestamps:
(00:00:19) Intro
(00:00:25) What are NPM Packages?
(00:00:49) Review of our ClojureScript Project
(00:01:03) Where can NPM Packages be used?
(00:01:22) Overview of working with NPM Packages
(00:01:22) Overview of working with NPM Packages
(00:03:18) Step 1 - Upgrade Version of Figwheel-Main
(00:03:36) Step 2 - Add Package.json
(00:04:20) Step 3 - Install Webpack and Webpack-CLI
(00:05:11) Step 4 - Install NPM Package - Axios
(00:05:56) Step 5 - Configure figwheel to use NPM packages
(00:06:55) Step 6 - Update index.html file
(00:07:23) Step 7 - Use our NPM package!
(00:09:00) Gotchas
😍Sponsor
I'm in no way affiliated to the maintainers of ClojureScript, but send some love their way if you have the means 🙏🏻
David Nolen - github.com/spo...
Mike Fikes - github.com/spo...
📚Additional Resources
What is NPM? - ui.dev/npm/?ck...
Official CLJS NPM Module Guide - clojurescript....
Figwheel Main NPM Modules Guide - figwheel.org/d...
🤦♂️ Gotchas
On windows? npx not found?
clojureverse.o...
❤️Follow Me
Twitter - / athomasoriginal
Between Two Parens Blog - betweentwopare...
Github - github.com/ath...
30 сен 2024