Menu icon Foundation
Trying to add Slick Carousel via config.yml / NPM Install

If I try: 

npm install --save-dev slick-carousel

I get:

npm ERR! 404 Not Found: [email protected]://registry.npmjs.org/har-validator/-/har-validator-5.1.2.tgz

 

Then I saw inside config.yml an area to add JS libraries for Webpack compilation. So I tried:

entries:
    - "src/assets/js/lib/slick/slick.js"
    - "src/assets/js/app.js"

Once compiled I get a separate JS file in the /dist/js directory which I guess I can then add in the <head>.

 

Is there a way to have slick.js added to app.js to reduce HTTP requests?

javascriptwebpackymlnpm

If I try: 

npm install --save-dev slick-carousel

I get:

npm ERR! 404 Not Found: [email protected]://registry.npmjs.org/har-validator/-/har-validator-5.1.2.tgz

 

Then I saw inside config.yml an area to add JS libraries for Webpack compilation. So I tried:

entries:
    - "src/assets/js/lib/slick/slick.js"
    - "src/assets/js/app.js"

Once compiled I get a separate JS file in the /dist/js directory which I guess I can then add in the <head>.

 

Is there a way to have slick.js added to app.js to reduce HTTP requests?

This post has been closed. No new replies can be added.

Matt Bohea 11 months ago

Figured it out using the imports in app.js.