I've read Adding stylesheets (CSS) and JavaScript (JS) to a Drupal 8 module and I can see where you can add assets that are part of your module or from a CDN or external source. What about if that library you want to add is already a core asset?
I'm trying to add jquery.ui.accordion
to my modules so in my *.libraries.yml
I have:
my_module:
js:
/core/assets/vendor/jquery.ui/ui/widgets/accordion-min.js: { minified: true }
dependencies:
- core/jquery.ui
- core/jquery.ui.widget
That library is never loaded. What am I missing? Is there a better way to add core assets to my module?
EDIT: I've also tried different paths like:
core/assets/vendor/jquery.ui/ui/widgets/accordion-min.js: { minified: true }
../../../core/assets/vendor/jquery.ui/ui/widgets/accordion-min.js: { minified: true }