Coder Social home page Coder Social logo

Comments (5)

crimx avatar crimx commented on May 16, 2024 1

Both esm and es2015 support tree-shaking, excpet the esm is transpiled to es5. The es2015 runs better in modern browsers and should have samller minification result.

Glad it works. Happily closing this.

from observable-hooks.

crimx avatar crimx commented on May 16, 2024

Sorry for the inconvenience. I will look into this and see what I can do.

from observable-hooks.

SweVictor avatar SweVictor commented on May 16, 2024

No problem, we found the issue eventually. Code-wise I don't think anything needs to be changed, just a heads up to people having similar issues.

from observable-hooks.

crimx avatar crimx commented on May 16, 2024

Would you checkout the observable-hooks@alpha and see if it solve your issue? Should works without transpilation.

from observable-hooks.

SweVictor avatar SweVictor commented on May 16, 2024

It does, very nice and quick fix! IE11 happy again without any special webpack configuration!

A quick double-check by hacking observable-hooks@alpha to always point to the es2015 version makes IE11 crash again validating the fix on your side actually has effect and that webpack by default chooses the "module" entry in package.json.

All this makes one wonder if tree-shaking and minification results in webpack could be improved by transpiling ALL node_modules... That's an investigation for another day though!

Thanks again
/Victor

(hacked package.json that makes IE11 error out again, actual observablehooks@alpha works well

  "main": "dist/cjs/index.js",
  "module": "dist/esm2015/index.js",
  "es2015": "dist/esm2015/index.js", 

)

from observable-hooks.

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.