Top "Babeljs" questions

Babel (formerly 6to5) is a JavaScript compiler.

Alternative of Object.assign(...array)

Assume we have array of objects. Calling Object.assign(...array) makes an inheritance among those objects where object with index …

javascript babeljs ecmascript-next
Syntax error - Support for the experimental syntax 'decorators-legacy' isn't currently enabled

I'm trying to build JS react project with decorators. My .babelrc looks like this: { "presets": [ "@babel/preset-env", "@babel/preset-react", ], "plugins": [ "@…

javascript babeljs
Error: Couldn't find preset "es2015" relative to directory "/Users/username"

I get the following error when trying to use gulp-babel: Error: Couldn't find preset "es2015" relative to directory "/Users/username" …

javascript node.js ecmascript-6 gulp babeljs
Unable to access React instance (this) inside event handler

I am writing a simple component in ES6 (with BabelJS), and functions this.setState is not working. Typical errors include …

javascript reactjs ecmascript-6 babeljs
Error: Missing class properties transform

Error: Missing class properties transform Test.js: export class Test extends Component { constructor (props) { super(props) } static contextTypes = { router: React.…

javascript webpack babeljs ecmascript-next
Remove console.logs with Webpack & Uglify

I am trying to remove console.logs with Webpack's Uglify plugin but it seems that Uglify plugin that comes bundled …

reactjs webpack babeljs uglifyjs
'Symbol' is undefined in IE after using babel

I have a reactjs app written using ES6 standards, and I use webpack to build it. The webpack loads the …

reactjs webpack babeljs
jest: Test suite failed to run, SyntaxError: Unexpected token import

This is my jest configuration from the package.json file: "jest": { "automock": false, "browser": true, "moduleNameMapper": { "\\.(jpg|jpeg|png|gif|…

reactjs babeljs jestjs
Is it okay to use babel-node in production

I have been developing a site using babel-node and browserify with the babelify transform, to support ES6 syntax. I am …

javascript node.js browserify babeljs
Extending Error in Javascript with ES6 syntax & Babel

I am trying to extend Error with ES6 and Babel. It isn't working out. class MyError extends Error { constructor(m) { …

javascript ecmascript-6 babeljs transpiler