-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Our generators currently collect any Theia extension installed in node_modules and mount them into your application without leaving you much of a choice. An alternative could be to create your own generators, but this is a lot of maintenance work. This commit simplifies the process of controlling what ends up in your applications by adding new loading strategies: - all: Like before, use everything found in node_modules - explicitDependenciesOnly: only use what is defined in your dependencies This is configurable from an application package.json through the theia.extensions.loading.strategy field. In addition to those strategies, you can also specify an includes list and an excludes list. Using those, you can define regular expressions to filter extensions even more precisely. The matching will be done on the candidate inversify modules path. When using the `explicitDependenciesOnly` the includes list will be evaluated as "in addition to explicit dependencies". If you want the includes list to be absolute again, use the default 'all' strategy so that only what's defined in includes is included. Note that preventing an extension from having its inversify modules loaded won't prevent it from being included in your bundles. Bundling should also mostly work no matter what you exclude, but if another extension was relying on a given Symbol it will most likely break at runtime. In such a case it is your responsability to bind the missing symbols using a custom Theia extension, specific to your use-cases. Signed-off-by: Paul Maréchal <paul.marechal@ericsson.com>
- Loading branch information
1 parent
fd91f21
commit 5754eb4
Showing
5 changed files
with
119 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters