Git Product home page Git Product logo

es6-micro-loader's People

Contributors

caridy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

es6-micro-loader's Issues

Support dynamic System.register

See https://github.com/systemjs/systemjs/blob/master/lib/extension-register.js#L63

When creating bundles for SystemJS, to allow AMD, CommonJS and ES6 to all bundle together we use dynamic System.register with 4 arguments to allow this.

If we could support this form as well in the micro loader, then we would be able to create bundles of any module format and have them work against a micro loader. That would provide a really nice dev -> production workflow with SystemJS -> micro loader.

I'm keen to work along these lines.

Top-level promise for System.import not resolved for dynamically loaded files

@caridy I can't send a proper patch atm (will do later today while back at home) but there is a bug in the System.import handling of promises for dynamically loaded files - please notice how resolve is never called when a file is loaded.

I believe that the proper solution is to do:

    import: function(name) {
        var normalizedName = normalizeName(name, []);
        var mod = get(normalizedName);
        return mod ? Promise.resolve(mod) : load(name).then(function () {
            return get(normalizedName);
        });
    },

Does it sound reasonable? If so I will try to submit a PR, including tests (I just need to get familiar with the tools / testing strategy this project is using).

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.