babel

What is a Preset in Webpack?

I started studying Webpack, in the article the author installs Babel, babel-core, babel-loader, etc. then explains what's wha ... that converts JSX to JavaScript. " But I'm not do you understand what Presets or Presets are? what is it and what is it for?

Gulp build for IE11

A website was created using gulp. The trouble is that in IE, the scripts do not work, although it seems that everything you n ... /*.php' ]).on('change', browserSync.reload); }); gulp.task('default', gulp.series('compileCSS', 'compileJS', 'watch'));

Support for the experimental syntax 'classProperties' isn't currently enabled

I added Truncate-react to my project after that, react asked me to install @babel/plugin-proposal-class-properties, which I d ... roperties I installed with the label --save-dev But after all this, I still get knocked out by an error that looks like this

JavaScript: Using private methods in JavaScript + VSCode + babel-eslint

The problem is that the babel-eslint linter swears at private methods in the classes: Parsing error: This experimental syntax ... -private-methods and @babel/plugin-proposal-class-properties, naturally not forgetting to add them in the file .babelrc.json.

Automatic translation of ES6 to ES2015 using gulp

Installed packages npm install --save-dev gulp-babel babel-core babel-preset-env Next, the dependencies from the package. ... ch('app/*.html', browserSync.reload); gulp.watch('app/js/*.js', browserSync.reload); }); And the structure of the project

The object does not support the "assign" property or method in IE11

Configured webpack + babel as follows Webpack.config.js ... module: { rules: [ { test: /\.(js|jsx)$/, ... I run everything ok in chrom, in IE 11 it gives an error The object does not support the "assign" property or method

Babel is this still relevant or not?

Hello. I'm starting to learn JavaScript, I wrote code using ECMAScript 2015. In all browsers, everything worked. Do I need to use Babel now to turn the code from ES6 to ES5, or is it no longer relevant? Thanks.

Which babel preset to connect instead of @babel/stage-0

@babel/stage-x removed in Babel 7+ Which preset to connect to .babelrc that would work import/export from es6 I use webpack 4 ... "node": "current", }, "useBuiltIns": 'entry' }], "@babel/react" ] } Mistake

How to check support for es 2015, 2016?

I want to generate several variants of js on the site (es5, es2015, es2016), and give the client the necessary file with js, ... he user agent, and understand by it whether this browser supports es2015, or not, maybe there is some php a library for this?

Module parse failed: Unexpected token (7:4) You may need an appropriate loader to handle this file type

Error in ./REST_R/frontend/src/components/App.js 7:4 Module parse failed: Unexpected token (7:4) You may need an appropr ... ", "webpack": "^4.16.2", "webpack-cli": "^3.1.0" }, "dependencies": { "babel-preset-es2015": "^6.24.1" } }