Socket
Socket
Sign inDemoInstall

@babel/core

Package Overview
Dependencies
53
Maintainers
6
Versions
181
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @babel/core

Babel compiler core.


Version published
Weekly downloads
50M
decreased by-0.12%
Maintainers
6
Install size
6.37 MB
Created
Weekly downloads
 

Package description

What is @babel/core?

@babel/core is the core library of the Babel JavaScript compiler. It is primarily used for transforming ES6+ code into backwards compatible JavaScript that can be run by older JavaScript engines. Babel is widely used for its ability to transpile new JavaScript syntax, JSX, TypeScript, and for its plugin system that allows developers to use experimental features and customize the build process.

What are @babel/core's main functionalities?

Syntax Transformation

Transforms modern JavaScript syntax into a backwards compatible version. For example, it can convert ES6 arrow functions into regular ES5 functions.

require('@babel/core').transform('code', { presets: ['@babel/preset-env'] });

Plugin/Preset Application

Applies Babel plugins or presets to the code to enable specific transformations or sets of transformations.

require('@babel/core').transform('code', { plugins: ['@babel/plugin-transform-arrow-functions'] });

Source Map Generation

Generates source maps which help in debugging the original source code after it has been transformed by Babel.

require('@babel/core').transform('code', { sourceMaps: true });

Code Generation

Generates code from an Abstract Syntax Tree (AST). This is useful when you want to transform the AST directly or manipulate it before generating code.

require('@babel/core').transformFromAst(ast, 'code', { presets: ['@babel/preset-env'] });

Other packages similar to @babel/core

Changelog

Source

v7.15.0 (2021-08-04)

:eyeglasses: Spec Compliance
  • babel-parser
    • #13523 feat(ts): raise error for abstract property with initializer (@fedeci)
:rocket: New Feature
  • babel-parser
    • #13229 Add attachComment parser option to disable comment attachment (@JLHwung)
  • babel-standalone
  • babel-parser, babel-preset-env
  • babel-plugin-transform-typescript, babel-preset-typescript
  • babel-plugin-transform-typescript
  • babel-core, babel-helper-create-class-features-plugin, babel-helper-module-transforms, babel-plugin-transform-modules-commonjs
    • #13290 feat: add noIncompleteNsImportDetection assumption to plugin-transform-modules-commonjs (@fedeci)
  • babel-plugin-transform-react-display-name
  • babel-parser, babel-plugin-proposal-pipeline-operator, babel-plugin-syntax-pipeline-operator
  • babel-generator, babel-parser, babel-plugin-proposal-pipeline-operator, babel-plugin-syntax-pipeline-operator, babel-traverse, babel-types
  • babel-plugin-transform-runtime
  • babel-compat-data, babel-helper-compilation-targets, babel-preset-env
  • babel-compat-data, babel-parser, babel-preset-env
:bug: Bug Fix
  • babel-parser, babel-plugin-transform-typescript
  • babel-plugin-transform-typescript
    • #13605 Handle typescript function overloading in a default export (@tony-go)
  • babel-parser
:memo: Documentation

We have to split the v7 changelog in multiple files otherwise it's too big to render on GitHub.

Readme

Source

@babel/core

Babel compiler core.

See our website @babel/core for more information or the issues associated with this package.

Install

Using npm:

npm install --save-dev @babel/core

or using yarn:

yarn add @babel/core --dev

Keywords

FAQs

Last updated on 04 Aug 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc