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:
pnpm e.g. nests below a node_modules/.pnpm/maplibre-gl
monorepos often have node_modules at root but not in each package
@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.
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 https://github.com/plotly/plotly.js/blob/8b7805da75a01181d31a15468fb4b51959e650e6/package.json#L6