import with webpack is not working
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
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'
}
]
}
]
}
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"