GitHub · npm · Edit this page
Decorators are not currently supported
See transform-decorators for more information.
Syntax only
This plugin only allows Babel to parse this syntax. If you want to transform it then see transform-decorators.
This plugin allows Babel to parse decorators.
npm install --save-dev babel-plugin-syntax-decorators
.babelrc
(Recommended).babelrc
{
"plugins": ["syntax-decorators"]
}
babel --plugins syntax-decorators script.js
require("babel-core").transform("code", {
plugins: ["syntax-decorators"]
});