Top "Babeljs" questions

Babel (formerly 6to5) is a JavaScript compiler.

How to resolve "Cannot use import statement outside a module" in jest

I have a React application (not using Create React App) built using TypeScript, Jest, Webpack, and Babel. When trying to …

reactjs jestjs babeljs babel-jest ts-jest
Babel 7 - ReferenceError: regeneratorRuntime is not defined

I have an application that is a node backend and a react frontend. I get the following error when i …

javascript node.js webpack babeljs
Why does Object.assign() require a polyfill when babel-loader is being used?

I'm attempting to use Object.assign() in an ES6 web app compiled by Babel with webpack, but I'm getting an …

javascript ecmascript-6 webpack babeljs
BABEL Note: The code generator has deoptimised the styling of "app.js" as it exceeds the max of "100KB in Meteor

My app.js file in meteor has exceeded the limit of 100KB How do I fix this now? Does It …

meteor babeljs
Webpack + Babel: Couldn't find preset "es2015" relative to directory

I have a React project using Webpack and Babel. When I created it on an office computer, the Webpack ran …

reactjs webpack babeljs webpack-dev-server
What's the difference between babel-preset-stage-0, babel-preset-stage-1 etc?

My question is : What's the difference between babel-preset-stage-0,babel-preset-stage-1,babel-preset-stage-2 and babel-preset-stage-3, and what's the best choice when we develop …

ecmascript-6 babeljs
Can't require() default export value in Babel 6.x

In Babel 5.x, I can write the following code: app.js export default function (){} index.js require('babel/register'); require(…

javascript ecmascript-6 babeljs
Babel file is copied without being transformed

I have this code: "use strict"; import browserSync from "browser-sync"; import httpProxy from "http-proxy"; let proxy = httpProxy.createProxyServer({}); and I …

javascript babeljs
Module.exports and es6 Import

React with babel. I have this confusion with imports and module.exports. I assume babel when converting the ES6 code …

javascript babeljs es6-module-loader
Webpack babel 6 ES6 decorators

I've got a project written in ES6 with webpack as my bundler. Most of the transpiling works fine, but when …

javascript webpack ecmascript-6 babeljs decorator