Skip to content
#

Babel

babel logo

🐠 Babel is a compiler created by Sebastian McKenzie in 2014 to convert ES6 to ES5 (originally called 6to5). It has since become a toolchain that enables developers to write any next generation JavaScript and serves as a testing ground for proposals from TC39, the technical committee that specifies ECMAScript. Babel can also convert JSX syntax and strip out type annotations from both Flow and TypeScript. Babel is built out of plugins. Compose your own transformation pipeline using plugins written by the community or write your own.

Here are 7,646 public repositories matching this topic...

pmcelhaney
pmcelhaney commented Sep 23, 2021

💻

  • Would you like to work on a fix?

How are you using Babel?

Other (Next.js, Gatsby, vue-cli, ...)

Input code

This lines from node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js

import _typeof from "@babel/runtime/helpers/typeof";
import assertThisInitialized from "./assertThisInitialized.js";

should be

import _typeof from "./
grommet
Fordi
Fordi commented Oct 22, 2020

For the most part this just works, but functions within tagged markup get weird indent assertions, e.g.,

        ${collection.map((item) => {
          const { prop1, prop2 } = workWith(item);  // eslint: expected indentation of 4 but found 10 (indent)
          return html`  // eslint: expected indentation of 4 but found 10 (indent)
            <${Widget} prop1=${prop1} prop2=${prop2} />
boopathi
boopathi commented Feb 20, 2017

Validate the entire tree of options passed to preset.

Maybe, each plugin can export a list of options that only babili preset understands and we can validate them only when using the preset and not when using the plugin separately.

module.exports = function plugin() {};
module.exports.options = PropTypes.object({
  n: PropTypes.number
});

Or, this can be implemented in bab

esbuild-loader
wanglihui
wanglihui commented Dec 31, 2020

in my old project , using webpack 1.x. And I use esbuild-loader replace babel-loader will print error

` building for production.../Users/wanglihui/WebstoreProject/onionfph5/project/node_modules/esbuild-loader/dist/plugin.js:12
compiler.hooks.thisCompilation.tap('esbuild', compilation => {
^

TypeError: Cannot read property 'thisCompilation' of undefined

Created by Sebastian McKenzie, James Kyle, Henry Zhu, Logan Smyth, Daniel Tschinder

Released September 28, 2014

Organization
babel
Website
babeljs.io

Related Topics

babel-es6 babel-plugin babel-preset