Open tn opened 4 years ago
hi, not sure if you resolved this or saw this thread: https://github.com/alex3165/react-mapbox-gl/issues/146,
there seems to be several next.js based solutions to this or adjacent to it. Incidentally none of them worked for me, but it might be my lack of experience with next
None of the examples from #146 showing use of NextJS Dynamic Import feature illustrate use of the Layer and Feature components. For me these components still do not work in NextJS even when using Dyanmic Imports.
Stackoverflow thread with code sample available here.
Latest version ^5 works fine with next.js. Suggest to close this issue. :) I did not need dynamic imports.
I did have to manually add this to my _app.js though
import 'mapbox-gl/src/css/mapbox-gl.css';
Next.JS error:
package.json