Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant