mapbox / mapbox/mapbox-gl-rtl-text

import with webpack is not working

Open
#18 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged bug
Dominant language
JavaScript
Stars
65
Forks
24
PR merge metrics
No merged PRs in 30d

Description

Hello together,

I tried to import it with webpack via
`import mapboxglRTL from '@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text';`

Webpack give me then following error:
```
ERROR in ./node_modules/@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.js
Module not found: Error: Can't resolve 'fs' in 'project/node_modules/@mapbox/mapbox-gl-rtl-text'
```

using Version 0.2.1

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 with the package entry referenced as mapbox-gl-rtl-text.js and reproduce the Version 0.2.1 import through webpack. Trace why resolving the package brings in Node's fs module; done means the documented import works in webpack without the reported module-not-found error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, webpack
Domain
build-system, frontend
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.