@babel/preset-stage-3

7.8.3 • Public • Published

@babel/preset-stage-3

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": [
    "@babel/plugin-syntax-dynamic-import",
    "@babel/plugin-syntax-import-meta",
    ["@babel/plugin-proposal-class-properties", { "loose": false }],
    "@babel/plugin-proposal-json-strings"
  ]
}

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-syntax-dynamic-import"),
      [require("@babel/plugin-proposal-decorators"), { "legacy": true }],
      [require("@babel/plugin-proposal-class-properties"), { "loose": true }],
    ],
    presets: [
      // ...
    ],
  };
};

NOTE: Compatibility between @babel/plugin-proposal-class-properties and @babel/plugin-proposal-decorators If you are including your plugins manually and using @babel/plugin-proposal-class-properties, make sure that @babel/plugin-proposal-decorators comes before @babel/plugin-proposal-class-properties.

When using the legacy: true option of @babel/plugin-proposal-decorators, @babel/plugin-proposal-class-properties must be used in loose: true mode.

If you are not using @babel/plugin-proposal-decorators, loose mode is not needed.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
7.8.35,006latest

Version History

VersionDownloads (Last 7 Days)Published
7.8.35,006
7.8.02
7.0.0377
7.0.0-rc.43
7.0.0-rc.32
7.0.0-rc.21
7.0.0-rc.11
7.0.0-rc.00
7.0.0-beta.560
7.0.0-beta.551
7.0.0-beta.5136
7.0.0-beta.500
7.0.0-beta.4952
7.0.0-beta.486
7.0.0-beta.472,154
7.0.0-beta.4637
7.0.0-beta.450
7.0.0-beta.4499
7.0.0-beta.431
7.0.0-beta.4220
7.0.0-beta.411
7.0.0-beta.409
7.0.0-beta.3996
7.0.0-beta.382
7.0.0-beta.3726
7.0.0-beta.3616
7.0.0-beta.351
7.0.0-beta.347
7.0.0-beta.330
7.0.0-beta.3211
7.0.0-beta.311
7.0.0-beta.50
7.0.0-beta.41

Package Sidebar

Install

npm i @babel/preset-stage-3

Homepage

babeljs.io/

Weekly Downloads

8,622

Version

7.8.3

License

MIT

Unpacked Size

4.76 kB

Total Files

4

Last publish

Collaborators

  • hzoo
  • existentialism
  • nicolo-ribaudo
  • jlhwung