Asset paths for modules which names end with 'components' are rewritten incorrectly

Created on 21 May 2024, 7 months ago
Updated 19 August 2024, 4 months ago

Problem/Motivation

When trying to use the module for sdc component libraries defined in a module named with the `components` suffix, asset paths are rewritten incorrectly.

The problem is in rewriteLibraryForDist and rewriteLibraryForDev functions, when determining theme/module relative path to component assets. There is a check for 'components/' path fragment, which is too loose, and should check '/components/' to only match the component directory instead of any directory which name ends with 'components'.

Proposed resolution

Make the path checks more strict to only match actual component directories.

🐛 Bug report
Status

Fixed

Version

1.1

Component

Code

Created by

🇵🇱Poland wotnak

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024