Skip to content
This repository has been archived by the owner on Jan 30, 2025. It is now read-only.

Module resolution order #33

Open
PedroPerpetua opened this issue Feb 19, 2024 · 0 comments
Open

Module resolution order #33

PedroPerpetua opened this issue Feb 19, 2024 · 0 comments

Comments

@PedroPerpetua
Copy link

Currently, if you install multiple modules, it seems that they're resolved in whichever order Yarn will resolve them, regardless of which order you place them in the configuration.

This can be problematic if you have multiple modules and they override some of each other's features; a practical example is two modules that add a different translation for the same string. Currently, the module system does not seem to consider any user-given order for how they're applied, simply taken the Yarn resolution order.

There's currently a workaround where you can alias your modules alphabetically to set their resolution order:

# build_config.yaml
modules:
    - m1@file:path/to/module1
    - m2@file:path/to/module2

This way, m2 will be "on top" and override whatever m1 sets, effectively setting an order. However, this can very easily break if, for example, Yarn changes how they resolve modules. The module system should rely on the order given by the user in some way.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant