GithubHelp home page GithubHelp logo

Comments (6)

goshacmd avatar goshacmd commented on May 18, 2024 2

Generators need the regeneratorRuntime polyfill which comes from the babel-polyfill module. You do need the modules and npm integration for that to work.

from babel-brunch.

jmls avatar jmls commented on May 18, 2024 1

ok, so I removed babel-runtime, and have this in the config:


        babel: {
            plugins: ['transform-async-to-generator']
        }

everything compiles (good)

but I error in the browser (bad)

Uncaught ReferenceError: regeneratorRuntime is not defined

which is why I thought I needed the runtime in the first place ;)

from babel-brunch.

paulmillr avatar paulmillr commented on May 18, 2024

I don't see why babel runtime is needed here. Try it without the runtine.

from babel-brunch.

jmls avatar jmls commented on May 18, 2024

oh, blast. Thanks.

from babel-brunch.

jmls avatar jmls commented on May 18, 2024

not that I'm against moving to npm and modules, but I'm somewhat stuck with how I convert my existing js files (see example below) over to a module format (I have several dozen .js files (1 for each controller / factory / service etc)

/* global angular */
(() => {
    'use strict';
    /** @ngInject */
    function sdkFactory($http) {
        return {};
    }

    angular
        .module('myApp')
        .factory('sdkFactory', sdkFactory);
})();

from babel-brunch.

jmls avatar jmls commented on May 18, 2024

Closing, as not relevant anymore (I'm working out how to use ES6 modules).

thanks for the help.

from babel-brunch.

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.