Problem/Motivation

raw-loader is used to inline svg in our cke5 wepack build. there is a security issue in one of the dependency of raw-loader: https://github.com/advisories/GHSA-76p3-8jx3-jpfq

raw-loader itself is deprecated in webpack5 so we don't need it.

Steps to reproduce

Proposed resolution

use wepack5 features to replace raw-loader.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nod_ created an issue. See original summary.

nod_’s picture

no changes to the built files.

nod_’s picture

Status: Active » Needs review
nod_’s picture

nod_’s picture

and the 9.5 version while i'm at it.

nod_’s picture

lauriii’s picture

Status: Needs review » Needs work
  1. This change is recommended by https://webpack.js.org/guides/asset-modules/ which is great 👍
  2. I tried modifying one of the SVGs that is loaded inline to CSS and the change appeared in the generated CSS 👍
  3. I noticed that there are couple other changes in the generated CSS. I think we should generate new patch where we run yarn build:css ⚠️
nod_’s picture

Status: Needs work » Needs review
FileSize
6.44 KB
1.82 KB

css changes are in 9.5 because of missing changes in the postcss patch, didn't want to step anywhere so removed it. Adding it back.

lauriii’s picture

Status: Needs review » Reviewed & tested by the community

That's right, I realized the patch should only have an impact on CKEditor 5 build. I tested again with CKEditor 5 related SVG and confirmed those are still loaded too 😇. To me #8 seems fine even though the changes are unrelated because that's the result of running yarn build (which should always be run when reviewing changes to package.json / yarn.lock).

Confirmed that Drupal 10 looks all good 👍

  • longwave committed b2bc383 on 10.1.x
    Issue #3319917 by nod_, lauriii: Remove raw-loader dependency
    

  • longwave committed c0b30d9 on 10.0.x
    Issue #3319917 by nod_, lauriii: Remove raw-loader dependency
    
    (cherry...
longwave’s picture

Version: 10.1.x-dev » 9.5.x-dev

Committed and pushed b2bc383ebe to 10.1.x and c0b30d9236 to 10.0.x. Thanks!

Will backport to 9.5.x once #8 comes back green.

alexpott’s picture

@longwave congrats on your first commit!

lauriii’s picture

Congrats @longwave 🥳 🎉

nod_’s picture

and it's green :D

longwave’s picture

Status: Reviewed & tested by the community » Fixed

Committed f18b610 and pushed to 9.5.x. Thanks!

  • longwave committed f18b610 on 9.5.x
    Issue #3319917 by nod_, lauriii: Remove raw-loader dependency
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.