Switch branches/tags
Find file History
vikr01 and nicolo-ribaudo Use jsonc to parse babelrc comments in markdown files (#8643) [skip ci]
* [skip ci] use markdown jsonc to parse comments in README files

* [skip ci] change json to jsonc type in other markdown files
Latest commit 29a2878 Sep 7, 2018



As of v7.0.0-beta.55, we've removed Babel's Stage presets. Please consider reading our blog post on this decision for more details. TL;DR is that it's more beneficial in the long run to explicitly add which proposals to use.

For a more automatic migration, we have updated babel-upgrade to do this for you (you can run npx babel-upgrade).

If you want the same configuration as before:

  "plugins": [
    // Stage 0

    // Stage 1
    ["@babel/plugin-proposal-optional-chaining", { "loose": false }],
    ["@babel/plugin-proposal-pipeline-operator", { "proposal": "minimal" }],
    ["@babel/plugin-proposal-nullish-coalescing-operator", { "loose": false }],

    // Stage 2
    ["@babel/plugin-proposal-decorators", { "legacy": true }],

    // Stage 3
    ["@babel/plugin-proposal-class-properties", { "loose": false }],

If you're using the same configuration across many separate projects, keep in mind that you can also create your own custom presets with whichever plugins and presets you're looking to use.

module.exports = function() {
  return {
    plugins: [
      [require("@babel/plugin-proposal-decorators"), { "legacy": true }],
      [require("@babel/plugin-proposal-class-properties"), { "loose": false }],
    presets: [
      // ...