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
In Theia we generate code for Browser, Node and Electron. In the generated code we import third party dependencies like inversify. In Theia we encourage users to use @theia/core/shared/inversify in their code, so we should do the same for the generated code.
This prevents issues in which an adopter project has a different package layput than Theia does. For example if inversify is not hoisted to the root of node_modules of an adopter, their webpack build of src-gen will fail as the generated require('inversify') can't be resolved, while their @theia/core/shared/inversify imports will resolve as inversify is successfully nested in @theia/core.
The text was updated successfully, but these errors were encountered:
Src-gen is executed in the environment controlled by adopters. In the
generated code dependencies are imported. If these dependencies are not
located where webpack expects them, the adopter will experience build
errors. This is not a common case, but it does happen in practice.
The generated code is made more robust by reusing the shared core
dependencies where applicable. As it's common to declare '@theia/core'
as a dependency within the adopter package, this more commonly results
in a working build.
Resolveseclipse-theia#15173
Contributed on behalf of STMicroelectronics
In Theia we generate code for Browser, Node and Electron. In the generated code we import third party dependencies like
inversify
. In Theia we encourage users to use@theia/core/shared/inversify
in their code, so we should do the same for the generated code.This prevents issues in which an adopter project has a different package layput than Theia does. For example if
inversify
is not hoisted to the root ofnode_modules
of an adopter, their webpack build ofsrc-gen
will fail as the generatedrequire('inversify')
can't be resolved, while their@theia/core/shared/inversify
imports will resolve asinversify
is successfully nested in@theia/core
.The text was updated successfully, but these errors were encountered: