0

This is what I wrote:

signUpInButton.addEventListener('click', async function () { 
    let userSignUp = {
        email: signUpEmail.value,
        password: signUpPassword.value
    }

This is what it does:

signUpInButton.addEventListener('click', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
  var userSignUp, creatingUser, validateEmail, request, response;

this is what I added to my Webpack:

{
    test: /\.js$/,
        exclude: /(node_modules)/,
        use: {
            loader: 'babel-loader',
            options: {
                presets: ['@babel/preset-env']
        }
    }
}

This is why this app doesn't work:

Uncaught ReferenceError: regeneratorRuntime is not defined
    at eval (index.js:152)
    at Module../src/index.js (bundle.js:73)
    at __webpack_require__ (bundle.js:575)
    at bundle.js:651
    at bundle.js:654
  • What is the problem? – Ernesto Stifano Aug 30 '21 at 18:31
  • Does this answer your question? [Babel 6 regeneratorRuntime is not defined](https://stackoverflow.com/questions/33527653/babel-6-regeneratorruntime-is-not-defined) – Seblor Aug 30 '21 at 18:40
  • This was 6 years ago –  Aug 30 '21 at 19:11
  • Yes, but it doesn't mean that the answer is outdated. It was even updated last year to include a link to the new polyfill module. If you sort the answer by "active", you will see [the latest updated answer](https://stackoverflow.com/a/36821986/3670132) says "If you're using babel 7, the package has been renamed to @babel/plugin-transform-runtime." – Seblor Aug 30 '21 at 20:50

0 Answers0