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

Created on 21 May 2024, about 1 month 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

Active

Version

1.1

Component

Code

Created by

πŸ‡΅πŸ‡±Poland wotnak

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

Comments & Activities

Production build 0.69.0 2024