Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR:
aresrpg-engine
sometimes importedthree
directly instead of using the centralizedthree-usage.ts
aresrpg-dapp
, we see 2 warningsThese warnings mean that
aresrpg-world
,aresrpg-dapp
andaresrpg-engine
had different THREE versions.My understanding is that it happens because
aresrpg-engine
wants a THREE v0.163.0 whereasaresrpg-dapp
wants a THREE v0.164.1, so NPM installs both versions and both are bundled in the final product. To fix this, we could always synchronize versions in the 3 packages, but it is not very easy to do. I hope passingthree
as apeerDependecy
instead of adependency
will make npm understand thataresrpg-engine
can use the same version asaresrpg-dapp
.Importing multiple THREE versions is bad because:
aresrpg-dapp
, since a minified THREE is abound 600KB of minified javascript, so loading 3 different versions takes network and CPU time uselessly