Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugins order are incorrect: proposal-decorators compatibility with proposal-class-properties #105

Open
Carrotzpc opened this issue Dec 6, 2018 · 0 comments

Comments

@Carrotzpc
Copy link

NOTE: Compatibility with @babel/plugin-proposal-class-properties
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.

https://babeljs.io/docs/en/babel-plugin-proposal-decorators#note-compatibility-with-babel-plugin-proposal-class-properties

$ npx babel-upgrade
npx: installed 192 in 54.298s
🙌  Thanks for trying out https://github.com/babel/babel-upgrade!

Updating .babelrc config at .babelrc
Index: .babelrc
===================================================================
--- .babelrc	Before Upgrade
+++ .babelrc	After Upgrade
@@ -15,10 +15,9 @@
         "useBuiltIns": "entry",
         "modules": false
       }
     ],
-    "@babel/preset-react",
-    "@babel/preset-stage-0"
+    "@babel/preset-react"
   ],
   "env": {
     "development": {
       "plugins": [
@@ -48,7 +47,33 @@
       {
         "libraryName": "antd",
         "libraryDirectory": "lib"
       }
-    ]
+    ],
+    "@babel/plugin-syntax-dynamic-import",
+    "@babel/plugin-syntax-import-meta",
+    "@babel/plugin-proposal-class-properties",
+    "@babel/plugin-proposal-json-strings",
+    [
+      "@babel/plugin-proposal-decorators",
+      {
+        "legacy": true
+      }
+    ],
+    "@babel/plugin-proposal-function-sent",
+    "@babel/plugin-proposal-export-namespace-from",
+    "@babel/plugin-proposal-numeric-separator",
+    "@babel/plugin-proposal-throw-expressions",
+    "@babel/plugin-proposal-export-default-from",
+    "@babel/plugin-proposal-logical-assignment-operators",
+    "@babel/plugin-proposal-optional-chaining",
+    [
+      "@babel/plugin-proposal-pipeline-operator",
+      {
+        "proposal": "minimal"
+      }
+    ],
+    "@babel/plugin-proposal-nullish-coalescing-operator",
+    "@babel/plugin-proposal-do-expressions",
+    "@babel/plugin-proposal-function-bind"
   ]
 }
\ No newline at end of file
@Carrotzpc Carrotzpc changed the title Plugins order are incorrect proposal-decorators compatibility with proposal-class-properties Plugins order are incorrect: proposal-decorators compatibility with proposal-class-properties Dec 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant