- Issue created by @anand.toshniwal93
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 4:07am 11 October 2023 - last update
over 1 year ago 14 pass - Status changed to Needs work
over 1 year ago 8:50am 11 October 2023 - 🇦🇺Australia darvanen Sydney, Australia
Thanks for this, there are a couple of complications we'll need to sort out first.
If we commit this patch as-is it will revert any sites that have gone to the effort of installing the library to using the CDN which isn't necessarily going to break them, but could cause some outages.
I agree that installing with composer is ideal - can you provide the method with which you achieved that? Perhaps we can roll that into the module.
If we can automate the library inclusion in a standardised and future-proofed way, it's probably worth a minor release with a big fat warning on it and remediation instructions as there are already over 1k sites reporting usage of 4.1.x.
- 🇦🇺Australia darvanen Sydney, Australia
While adding GitLab CI I switched the builder from gulp to vite, it would be very easy to bundle the library directly into this package and I'm tempted to do so.
- Status changed to Postponed: needs info
10 months ago 2:12pm 1 June 2024 - 🇦🇺Australia darvanen Sydney, Australia
@anand.tshniwal93 I've come back to review this and I have to ask - how are you using composer to install an npm dependency? That is not something supported by composer.
I'm going to mark this postponed for a minimum of 1 month for further feedback, and potentially close as "works as designed" after that.
I'd encourage anyone having issues with JS dependencies to check out a work-in-progress solution to this problem at https://github.com/darvanen/drupal-js
- Assigned to darvanen
- Status changed to Active
10 months ago 3:54am 20 June 2024 - 🇦🇺Australia darvanen Sydney, Australia
As of 4.2.0 the slide-element library is now bundled into the built code. It is no longer necessary to mess around with CDNs or downloaded libraries. I'm updating the readme to reflect this.
-
darvanen →
committed b1583461 on 4.x
Issue #3392947 by darvanen: Update readme to reflect JS library download...
-
darvanen →
committed b1583461 on 4.x
- Issue was unassigned.
- Status changed to Fixed
10 months ago 4:00am 20 June 2024 Automatically closed - issue fixed for 2 weeks with no activity.
- 🇩🇰Denmark ressa Copenhagen
Thanks @darvanen, as an end user, I am in favor of this approach, which I recently proposed in #3426106-11: Polyfill.io is no longer considered safe and should be removed → .
See also in #3458611-9: Removing the polyfill-fastly.io library of webform.libraries.yml → and #3390616-16: Document using local library file, with CDN as fallback → , where I suggested to relax the wording on the documentation page about using third party resources, which currently strongly advises against bundling libraries:
Having third party libraries that are hosted elsewhere on the Internet in the Drupal.org repo is strongly discouraged.
- 🇦🇺Australia darvanen Sydney, Australia
Thanks @ressa :)
If you haven't already, perhaps check out the #frontend-bundler-initiative based on the foxy module → . I suspect they may be of interest to you.
A note for anyone eyeing this approach: I don't think you can legally bundle libraries in your contrib code unless they're GPL-2+ compatible. More details at https://www.drupal.org/about/licensing →