UNPKG

2.05 kBJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = _default;
7
8function _default() {
9 throw new Error(`
10As of v7.0.0-beta.55, we've removed Babel's Stage presets.
11Please consider reading our blog post on this decision at
12https://babeljs.io/blog/2018/07/27/removing-babels-stage-presets
13for more details. TL;DR is that it's more beneficial in the
14 long run to explicitly add which proposals to use.
15
16For a more automatic migration, we have updated babel-upgrade,
17https://github.com/babel/babel-upgrade to do this for you with
18"npx babel-upgrade".
19
20If you want the same configuration as before:
21
22{
23 "plugins": [
24 // Stage 1
25 "@babel/plugin-proposal-export-default-from",
26 "@babel/plugin-proposal-logical-assignment-operators",
27 ["@babel/plugin-proposal-optional-chaining", { "loose": false }],
28 ["@babel/plugin-proposal-pipeline-operator", { "proposal": "minimal" }],
29 ["@babel/plugin-proposal-nullish-coalescing-operator", { "loose": false }],
30 "@babel/plugin-proposal-do-expressions",
31
32 // Stage 2
33 ["@babel/plugin-proposal-decorators", { "legacy": true }],
34 "@babel/plugin-proposal-function-sent",
35 "@babel/plugin-proposal-export-namespace-from",
36 "@babel/plugin-proposal-numeric-separator",
37 "@babel/plugin-proposal-throw-expressions",
38
39 // Stage 3
40 "@babel/plugin-syntax-dynamic-import",
41 "@babel/plugin-syntax-import-meta",
42 ["@babel/plugin-proposal-class-properties", { "loose": false }],
43 "@babel/plugin-proposal-json-strings"
44 ]
45}
46
47If you're using the same configuration across many separate projects,
48keep in mind that you can also create your own custom presets with
49whichever plugins and presets you're looking to use.
50
51module.exports = function() {
52 return {
53 plugins: [
54 require("@babel/plugin-syntax-dynamic-import"),
55 [require("@babel/plugin-proposal-decorators"), { "legacy": true }],
56 [require("@babel/plugin-proposal-class-properties"), { "loose": false }],
57 ],
58 presets: [
59 // ...
60 ],
61 };
62};
63`);
64}
\No newline at end of file