For some reason I'm not able to import a module stored locally on my computer. I've included type="module", spun up a Live Server using the VS Code extension and messed with the path name (., ..\ and ). There is also a TypeScript version of the package, that I tried to point to that would not work.
I also tried {WebMercatorViewport} and WebMercatorViewport in the import statement.
My code:
<script type="module">
import {WebMercatorViewport} from '../node_modules/@deck.gl/core/dist/es5/viewports/web-mercator-viewport.js';
</script>
The underlying file:
function WebMercatorViewport() {
//bunch of code here
return WebMercatorViewport;
}(_viewport.default);
exports.default = WebMercatorViewport;
(0, _defineProperty2.default)(WebMercatorViewport, "displayName", 'WebMercatorViewport');
You can clearly see that it's defined and it's the default.
But I still get this console error:
Uncaught SyntaxError: ambiguous indirect export: default
This happens in both Firefox and Chrome.
Can someone help me diagnose this?