Giter Site home page Giter Site logo

Comments (3)

slutske22 avatar slutske22 commented on June 5, 2024

No that was not intended, I intended for the build of this plugin to end up in es5. I think you're right, my tsconfig is not targeting .tsx files properly. I will take a look at this when I get a chance. I'd rather add the change to the tsconfig rather than in the npm script. Good catch!

Are you sure the change was to transpile:main? That is an artifact script that's not even being used anymore, as far as I can remember...what version of react-esri-leaflet are you using? I guess that script technically still works, but it does not run the build with any .d.ts files.

Also, if this is just a testing issue (react-esri-leaflet works in your app but not in tests), you can check out how to enable es6 in your mocha tests in the meantime. It may take me some time before being able to get this building properly with es5 and republished.

from react-esri-leaflet.

githubThrowaway999 avatar githubThrowaway999 commented on June 5, 2024

I'm using 1.1.0. You're right in that transpile:main is not being used; I was just trying to see if I could get my tests running at all, and ended up modifying that command and copying the output build folder into my project's node_modules. Will check out your link as well. Thanks for the quick response!

from react-esri-leaflet.

slutske22 avatar slutske22 commented on June 5, 2024

Ok I fixed it. I changed the tsconfig to use module: 'commonjs', which compiles the source code down to commonjs, which uses require instead of import. It didn't change the function of the library at all, but now it should be more compatible en environments that don't natively support es6 syntax, like mocha. Upgrade your react-esri-leaflet, should be up to 1.2.0 now, and see if that works for you.

from react-esri-leaflet.

Related Issues (15)

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.