装饰器脚手架报错

541 阅读1分钟

问题描述:
使用脚手架装饰器时报错 Parsing error: Using the export keyword between a decorator and a class is not allowed. Please use export @dec class instead.
解决:
在.eslintrc.js中修改: parserOptions": { "ecmaFeatures": { "legacyDecorators": true } },