mapbox / mapbox/leaflet-image

Forgotten webpack-dev server config in distribution dir?

Open
#133 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
380
Forks
140
PR merge metrics
No merged PRs in 30d

Description

Even though I'm using the release files there seems to be a "forgotten" (?) webpack-dev server config active:

![image](https://user-images.githubusercontent.com/731020/75162707-3ea72c00-571e-11ea-84a4-2ace3a9be956.png)

Comes from this passage. I could only get rid of by patching it:

```
diff --git a/node_modules/leaflet-distortableimage/dist/leaflet.distortableimage.js b/node_modules/leaflet-distortableimage/dist/leaflet.distortableimage.js
index 4f030b1..24ee13b 100644
--- a/node_modules/leaflet-distortableimage/dist/leaflet.distortableimage.js
+++ b/node_modules/leaflet-distortableimage/dist/leaflet.distortableimage.js
@@ -4616,12 +4616,12 @@ AbstractXHRObject.prototype._start = function(method, url, payload, opts) {
}
};

- try {
- self.xhr.send(payload);
- } catch (e) {
- self.emit('finish', 0, '');
- self._cleanup(false);
- }
+ // try {
+ // self.xhr.send(payload);
+ // } catch (e) {
+ // self.emit('finish', 0, '');
+ // self._cleanup(false);
+ // }
};

```

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 the release output in node_modules/leaflet-distortableimage/dist/leaflet.distortableimage.js, especially AbstractXHRObject._start and the shown bundled passage. Trace how the distribution files are built and verify that webpack-dev server configuration or behavior is not active in release files; done means the released package works without the reported development-server behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, webpack
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.