If we use x-engine inside a package in a monorepo usually the react / engine dependencies should be resolved to the parent node_modules . Currently x-engine set an alias resolving only from the the node_modules within the main package so in case you use it in a package inside a monorepo it wont work. With this fix we don't override a resolver alias already set and therefore we allow in a monorepo to set where we want to resolve these packages and make it work.
For example in a monorepo package that use webpack we could set something like this and make it work
Why this change ?
Currently in cp-content-pipeline monorepo we use storybook inside the ui package and we need this change to make it work with x-engine
If we use x-engine inside a package in a monorepo usually the react / engine dependencies should be resolved to the parent node_modules . Currently x-engine set an alias resolving only from the the node_modules within the main package so in case you use it in a package inside a monorepo it wont work. With this fix we don't override a resolver alias already set and therefore we allow in a monorepo to set where we want to resolve these packages and make it work.
For example in a monorepo package that use webpack we could set something like this and make it work
Why this change ? Currently in cp-content-pipeline monorepo we use storybook inside the ui package and we need this change to make it work with x-engine