Comments (7)
Hello @moose115 , sorry for the inconvenience. I found an issue yesterday that may b related to the issue you are experiencing: try to modify your tsconfig with moduleResolution
to "Bundler"
(instead of "Node").
I am investigating why this issue even happens, as the TS config did not change and MapLibre's did not either.
Let me know if that helps.
from maptiler-sdk-js.
Thank you for your response @jonathanlurie! Already had the property set to "bundler".
Found the issue, it has to do with new caching (but like I thought, it's just imports that are causing it). In caching.ts
one of functions imported form maplibre-gl is addProtocol
. I don't know why exactly, but for some reason rollup wants to import that function in particular separately via named imports, and fails miserably because maplibre-gl is a CommonJS module.
Importing maplibre-gl as default import in (Edit: I think that wouldn't be too neat, could even be a code smell)caching.ts
, and then accessing the function with maplibregl.addProtocol
prevents the function to be imported separately.
That function can be imported from index.ts
instead, where it is already imported and re-exported anyway. I'll submit the PR soon (#79).
from maptiler-sdk-js.
Hey @moose115 , thanks again for your fix, it is now part of the v2.0.1 available on npm!
from maptiler-sdk-js.
Iām also working on a SvelteKit project, and looks like the SDK v2.2.0 has reintroduced the issue š
from maptiler-sdk-js.
Hello @kyoshino , last week I pushed v2.2.1 with a fairly different export strategy, could you try it and let me know? If it does not work for you, can you please open another issue with more details specific to your use case?
from maptiler-sdk-js.
I am also experiencing this issue with a SvelteKit project and 2.2.0.
from maptiler-sdk-js.
Tested this again. The issue was reintroduced with v2.2.1, not v2.2.0. I have filed #99.
from maptiler-sdk-js.
Related Issues (19)
- MaptilerNavigationControl not available in the maptiler-sdk.d.ts HOT 3
- Compact attribution control not working HOT 7
- An error occurred while adding the weather layer HOT 1
- Unable to build the SDK with angular 16 HOT 3
- type declaration for typescript not working properly. HOT 5
- toBounds is not a function HOT 2
- `fullscreenstart` and `fullscreenend` event missing HOT 3
- Text field of GeoJSON symbol layer not visible HOT 4
- support maplibre-gl-js v4 HOT 2
- Memory leak HOT 4
- Update @maptiler/weather HOT 4
- 404 for doc links in readme HOT 1
- Make maker PopUp clickable HOT 3
- Changing MapTilerNavigationControl options have no effect HOT 2
- Does Map Tiler use Inflight? HOT 8
- LngLat is not available as a type/Class to import from @maptiler/sdk anymore HOT 3
- Broken imports from maplibre-gl in v.2.2.1 HOT 8
- Add required CSP directives
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from maptiler-sdk-js.