ReferenceError: regeneratorRuntime is not defined #7
When running this I'm hitting the error ReferenceError: regeneratorRuntime is not defined. I think this has to do with how the library is being built. You can work around this by configuring babel but that seems like a lot of overhead for consumers.
Double checked and this should be fine as is. This is likely because you are compiling to a target that needs babel-polyfill.
tannerlinsley closed this
I'm having the same issue. Here is my browserlistrc. Any suggestions on how to get this working?
> 1% not op_mini all not dead not ie 11here is my babel config
module.exports = function(api) { api.cache(true) const presets = [ ['@babel/preset-env', { useBuiltIns: 'entry', corejs: 3 }], ['@babel/preset-react'] ] const plugins = ['react-hot-loader/babel', 'babel-plugin-styled-components'] return { presets, plugins } }relevant webpack section
{ test: /.(js|jsx)$/, exclude: /node_modules/, use: { loader: 'babel-loader' } },My build is a webpack build using babel-loader with the preset used in CRA with Typescript enabled
I’m also using CRA in the example. Link to your project?
Tanner Linsley On Oct 30, 2019, 8:43 PM -0600, JaceHensley <notifications@github.com>, wrote:
My build is a webpack build using babel-loader with the preset used in CRA with Typescript enabled — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe.
Unfortunately it's a closed source app, but I'll take a stab at making a reproducible test case, I'll start with the example in this repo
Okay I think I see what the problem is. So I'm not using CRA but my own webpack.config.ts that is inspired by CRA but I don't have the
react-app-polyfillstuff. I already have a polyfill.ts so I should be able to add the babel ones thereThis comes everytime in nextjs projects. Heres the link to sandbox https://codesandbox.io/s/nifty-saha-s2k7d . Tried in local also same result.
Sign in to join this conversation.
I'll double check the babel implementation, but it should be including all of that in the build.