Coder Social home page Coder Social logo

Comments (2)

ai avatar ai commented on May 1, 2024

The main problem, that there is not good production solution for ES modules to test how it will work in real ES modules in wildlife :(.

ES modules for browsers requires a new generation of bundlers (to fix paths and make preload maps). We still need some features (like import maps) which didn’t ship yet. pike is a great start, but it could change API a few times before the final release.

from wouter.

molefrog avatar molefrog commented on May 1, 2024

Right, makes absolutely sense. One of problems is being able to import things from node_modules.

I made a small local demo with react being replaced with a global variable. You were right, the current code does not work, since the bare import specifiers aren't supported by the browsers. However, when I changed it to import .. from "./history.js" it fixed the problem:
Screenshot 2019-04-27 at 21 06 20
(it worked in Chrome, Safari and Edge, but not in IE11 obviously, since the code was untranspiled)

So I also decided to make a thorough inspection of the code to make sure I only use ES2015 (ES6) features. Here is full list of things the library uses:

  • arrow function
  • destructing assignment
  • default arguments & arguments spread
  • let / const

That's it! We should be good now.

from wouter.

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.