mapbox / mapbox/mapbox-gl-draw

Importing internal dependencies

Open
#786 5 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature refactor
Dominant language
JavaScript
Stars
1.1k
Forks
612
Avg merge
8d 9h
Merged PRs (30d)
5

Description

I am creating a new drawing mode. To avoid reinventing the wheel I would like to reuse some functions that were already implemented in:
```

@mapbox/mapbox-gl-draw/src/lib/common_selectors
@mapbox/mapbox-gl-draw/src/lib/double_click_zoom
```
I am using create-react-app and if I try to import any of them and build my project, I have the minification issue:

```bash
Failed to minify the code from this file:
./node_modules/@mapbox/mapbox-gl-draw/src/lib/double_click_zoom.js:2
```
I am using:
**mapbox-gl-js 0.44.2**:
**mapbox-gl-draw 1.0.7**:

I could send a PR if I get a better understanding how to solve this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting src/lib/common_selectors and src/lib/double_click_zoom, then reproduce the create-react-app build failure involving double_click_zoom.js. Determine what change is needed so these internal dependencies can be imported without the minification error; done means the project builds successfully with those imports.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.