Remove build artifacts

Created on 11 March 2025, about 2 months ago

Problem/Motivation

Multiple patches affecting javascript cannot be applied because of build artifact conflicts. An alternative approach would simplify contributing by not requiring a front-end build step or task runner, and would allow for applying patches without conflict.

Steps to reproduce

Attempt to apply 2 or more patches affecting files in the build folder.

Proposed resolution

Rather than supply a build artifact, require front-end dependencies using an alternative method.

Some solutions used by the community:

  • Asset Packagist (see article).
  • Package repository type.

Remaining tasks

  1. Test out the asset-packagist option.
  2. Test out the repository definition option.
  3. Determine if the repository has to be defined by the adopter.
  4. Remove build files, update libraries config.
  5. Determine whether this would be a breaking change.

IIRC, the repositories definition has to be at the project-level, and cannot be specified and relied upon from the module-level composer.json.

It would not be a breaking change if the 2nd option fully supplied the dependencies without requiring project-level composer.json updates by adopters.

API changes

Depending on the alternative method chosen, this may be a breaking change, since those using this may then be required to change their composer implementation to account for capturing the front-end libraries.

✨ Feature request
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jcandan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jcandan
  • πŸ‡ΊπŸ‡ΈUnited States jcandan
  • πŸ‡ΊπŸ‡ΈUnited States jcandan

    This is possibly a lot simpler than I originally imagined. There are no front-end dependencies outside Drupal core's CKEditor.

  • πŸ‡ΊπŸ‡ΈUnited States jcandan

    Moved to the source example project driving Drupal modules to use webpack builds.

    As I learn more about CKEditor 5 Plugin plugin development, I understand now that projects like Editor Advanced Link are led to implement a build by this project.

    I am curious what, if any, dependency issues exist that might prevent a Drupal module from not including a build process for CKEditor Plugin plugins.

  • πŸ‡ΊπŸ‡ΈUnited States jcandan

    If this really is a necessary component of the CKEditor Plugin plugin module development, is it possible to provide the Drupal GitLab CI with an NPM build so these artifacts are not required to be committed?

Production build 0.71.5 2024