Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update example configs #2477

Merged
merged 1 commit into from
Jan 28, 2025
Merged

Update example configs #2477

merged 1 commit into from
Jan 28, 2025

Conversation

Pessimistress
Copy link
Collaborator

Testing v8 alpha with examples.

@@ -4,7 +4,7 @@
"jsx": "react",
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chrisgervang this is a fairly unfamiliar issue for me -

We re-export everything from submodules as follows:

// modules/main/src/mapbox.ts
export * from '@vis.gl/react-mapbox';

and

// modules/main/package.json
"exports": {
    "./mapbox": {
      "types": "./dist/mapbox.d.ts",
      "require": "./dist/mapbox.cjs",
      "import": "./dist/mapbox.js"
    },

In the application tsconfig,

`"moduleResolution": "node"`

leads to

import {Map} from '@vis.gl/react-mapbox' // no error
//--- but ---
import {Map} from 'react-map-gl/mapbox' // fails to resolve

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird, I see this is in an example.. is this something that end users would be concerned with?

@Pessimistress Pessimistress merged commit b5090d7 into master Jan 28, 2025
2 checks passed
@Pessimistress Pessimistress deleted the x/examples branch January 28, 2025 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants