You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm in a codebase where we have modules that are composed both of self-contained dependencies and shared helpers. We'd love to use removeCombined but unfortunately some files need to stick around for future module combinations.
In this example, src/mainModuleFile1 and src/mainModuleFile2 are the modules that should be generated. Each one requires the "selfContainedDependency" file in its folder plus helpers/someHelper.
A few possible ways around this:
Allow removeCombined to be a predicate function (returning true/false, where true implies file can be safely removed as if removeCombined=true had been set)
If r.js supported a predicate removeCombined function, we could remove only the "selfContainedDependency" files and leave the helpers/someHelper file.
Add an option to avoid removing files that are outside of the directory the main module file is in (I'm not a fan of this due to coupling module names with filesystem which might not work for plugins)
I'm happy to work on a pull request if you are willing to accept either of the options above or have any other suggestions.
The text was updated successfully, but these errors were encountered:
I'm in a codebase where we have modules that are composed both of self-contained dependencies and shared helpers. We'd love to use removeCombined but unfortunately some files need to stick around for future module combinations.
Example directory structure:
In this example, src/mainModuleFile1 and src/mainModuleFile2 are the modules that should be generated. Each one requires the "selfContainedDependency" file in its folder plus helpers/someHelper.
A few possible ways around this:
I'm happy to work on a pull request if you are willing to accept either of the options above or have any other suggestions.
The text was updated successfully, but these errors were encountered: