Skip to content

Conversation

Steveb-p
Copy link
Contributor

🎫 Issue IBX-XXXXX

Description:

This PR fixes an issue that happens when developing frontend code using packages symlinked by Composer.

image

Issue stems from the fact that subpackage tries to load their own instance of @symfony/webpack-encore. Under normal circumstances (without symlinks) the project's one is selected. However, with symlinks, that module is no longer reachable - as it does not appear in any of the parent directories of package directory (since it resides elsewhere entirely).

To prevent this issue, I propose that we expect webpack.config.js modules exported from the package to be callables instead (in actuality, allow the to be callables). The exported function would expect to receive an instance of Symfony's Encore as first argument. This also ensures that they will actually receive a global Encore object.

For QA:

Documentation:

Copy link

Thanks for contribution! 🎉

To test the changes please execute:

composer config extra.symfony.endpoint https://api.github.com/repos/ibexa/recipes-dev/contents/index.json?ref=flex/pull-192

before executing the recipes.

Copy link

@Steveb-p Steveb-p requested a review from a team June 23, 2025 11:11
@ezrobot ezrobot requested review from GrabowskiM, tischsoic, dew326, OstafinL, RopRaptor and albozek and removed request for a team June 23, 2025 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants