fix require path to resource in node_modules #7146
Merged
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.
Fix #7145
Instead of providing the relative path to the node_modules, let the runtime resolve it.
It's a bit speculative, but it's easy to imagine setups (different package managers, monorepos) that doesn't have the maplibre-gl node module located exactly in the location specified:
@archmoj I don't have a repro of the error, and thus haven't been able to validate the patch. Also, I'm trying to wrap my head around why it's at all necessary for the users of a plotly.js distribution to resolve this path, because I expected webpack to have done so already when the plotly.js bundles are created.
Update: it's not using a pre-build dist, because of this
plotly.js/package.json
Line 6 in 8b7805d