Skip to content
Advertisement

Tag: babeljs

How to allow async functions in React + Babel?

I have a Typescript/React app, that can perform async function with a then/catch promise, but not with async/await/try/catch. The error is: Uncaught ReferenceError: regeneratorRuntime is not defined . The error seems to come from Babel. Here is my config: How to fix this? Answer You can find your solution at here If I summarise then you have to install a

Webpack resolve alias and compile file under that alias

I have project which uses lerna ( monorepo, multiple packages ). Few of the packages are standalone apps. What I want to achieve is having aliases on few of the packages to have something like dependency injection. So for example I have alias @package1/backendProvider/useCheckout and in webpack in my standalone app I resolve it as ../../API/REST/useCheckout . So when I

Ignore return outside of function with babel 7

I recently updated to babel 7 and webpack 4 and am receiving this error when running our gulp build task: This is caused by the return outside of a function in browser-syncs dev-ip dependency. Is there a way to configure my .babelrc file to ignore this? I’ve tried the following: Installing only production dependencies, but because browser sync is imported

Webpack.config.js: Configuration has an unknown property ‘default’

I’ve moved everything over from a working project (ultimate-hot-reloading-example), to an existing project of mine that uses the keystone cms. I uninstalled ALL dev dependencies in my project, and installed all of the exact dependencies in the working project into mine (webpack, babel, etc…). For some reason, the web.config.js file won’t parse the es6 syntax Which gives this error: If

Why is Babel 7 not compiling node_modules files?

I have error in IE11 SCRIPT1002: Syntax error (problem with class syntax). My simple code with 2 lines: I wan’t that my babel7 compile class into ES5 code I have tried write .babelrc file : and https://babeljs.io/docs/en/babel-plugin-transform-classes haven’t fixed too Update : I have tried use @babel/plugin-preset-es2015 which convert class in ES5 code but this package is deprecated in babel7

How to import from React-Select CDN with React and Babel?

I’ve created a react application following the steps on the React Website, but I’m having issues utilizing the React-Select Library (particularly the Select Component). I can only use cdn files to load dependencies, including the React-Select cdn file located on cdnjs I’m getting the following error with my react-app: See below for my script and here for my codepen I’ve

Advertisement