Looking for a way to control sub-dependencies while using Yarn. In Gulp, this was easy as below:
Can someone tell me how this can be accomplished using Yarn?
npm/yarn, you include your dependencies yourself instead.
So for example, at the top of your
assets/scripts/main.js file you would do:
(note the exclusion of
and you’re good to go.
You can see more about this on the sage-9 branch of the docs here under 3rd party packages.
The problem is that I am doing this now but with NO @import for the css, only @import in main.js, and the css from the package is still getting pulled in and my build process is then failing. I would like to have the package EXCLUDE the css altogether and only pull the js. The package I am working with is pretty-checkbox.
Your example above was with
lodash, and now you’re talking about a library called
pretty-checkbox, which from my search, if I found the right one doesn’t have any JS at all.