Giter VIP home page Giter VIP logo

Comments (5)

jingsam avatar jingsam commented on June 6, 2024 1

Why not just add an new option as excludeNodeModules than a hack towards mapbox-gl? As mapbox-gl-js V2.0.1 support external worker, how underrect handle this if we want transpile mapbox-gl-js V2?

If we add special processing towards mapbox-gl, does it mean we should add support for mapbox-gl-style-spec、p-finally and more. I think underreact is a generic webpack based build tool that should not give mapbox-gl a special hack.

from underreact.

kepta avatar kepta commented on June 6, 2024

It looks like we could fix this by updating the exclude regex in getConfigForNodeModules:

Do we know if doing this works for both gl-js v1 and v2?

from underreact.

samanpwbb avatar samanpwbb commented on June 6, 2024

Do we know if doing this works for both gl-js v1 and v2?

I'm not sure but this should be pretty easy to test.

from underreact.

kepta avatar kepta commented on June 6, 2024

@samanpwbb I think you approach of adding gl-js v2 to exclude: /@babel(?:\/|\\{1,2})runtime/, should work. My only suggestion would be to make sure that it is only added if the consumer actually has gl-js v2, so that we dont end up breaking anything for folks using underreact v1. I guess we can do this check by checking the version of gl-js and only then adding the exclusion.

from underreact.

samanpwbb avatar samanpwbb commented on June 6, 2024

Why not just add an new option as excludeNodeModules than a hack towards mapbox-gl? As mapbox-gl-js V2.0.1 support external worker, how underrect handle this if we want transpile mapbox-gl-js V2?

I think I agree - am going to add a second PR that does this, and defaults to including gl js in the exclude list

from underreact.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.