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

import with webpack is not working #18

Open
kappaxbeta opened this issue Feb 20, 2019 · 2 comments
Open

import with webpack is not working #18

kappaxbeta opened this issue Feb 20, 2019 · 2 comments

Comments

@kappaxbeta
Copy link

kappaxbeta commented Feb 20, 2019

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

@PhilippBaschke
Copy link

I worked around it by using the following import:

import mapboxglRTL from '@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.min.js';

in combination with a rule in module.rules:

module: {
  rules: [
    {
      test: /mapbox-gl-rtl-text.min.js$/,
      use: [
        {
          loader: 'file-loader'
        }
      ]
    }
  ]
}

@zedam
Copy link

zedam commented Oct 27, 2020

Trying to use it in a ThreeJs Project in order to create TextGeomtry in arabic text...

Using Webpack but I get this error and I don't know how to make it work...
I already added @PhilippBaschke fix, but I get:

mapbox_mapbox_gl_rtl_text_mapbox_gl_rtl_text_min_js__WEBPACK_IMPORTED_MODULE_7_.default.applyArabicShaping is not a function

any suggestion? Thanks!!

using "^0.2.3"

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

No branches or pull requests

3 participants