Why do I have copy files from node_modules to my rails 6 app

The docs for blueimp-gallery npm say install and copy css, img and js directories to my website Do really I have to copy those files to my rails 6 app Can’t the package use those directories by itself

You dont need to copy them. You can reference them as they are in the node_modules directory. I don’t know the method by heard with webpacker 5 and recent webpacker 6, but check out for example Simple css import from node_modules · Issue #349 · rails/webpacker · GitHub

I need to import all the files in the modules css, js and img directories Do I have to import only one file at a time as shown in the example