diff --git a/packages/babel-plugin-transform-decorators/src/index.js b/packages/babel-plugin-transform-decorators/src/index.js index ae3b5469cf..1b3fbed6f8 100644 --- a/packages/babel-plugin-transform-decorators/src/index.js +++ b/packages/babel-plugin-transform-decorators/src/index.js @@ -71,7 +71,20 @@ export default function ({ types: t }) { } function doError(path) { - throw path.buildCodeFrameError("Decorators are not supported yet in 6.x pending proposal update."); + throw path.buildCodeFrameError( +`Decorators are not officially supported yet in 6.x pending a proposal update. +However, if you need to use them you can install the legacy decorators transform with: + +npm install babel-plugin-transform-decorators-legacy --save-dev + +and add the following line to your .babelrc file: + +{ + "plugins": ["transform-decorators-legacy"] +} + +The repo url is: https://github.com/loganfsmyth/babel-plugin-transform-decorators-legacy. + `); } return {