问题1:一直报.....Cannot find module 'sass'
如果安装了sass,还是报这个错误,删掉node_modules文件夹;
问题2:Experimental support for decorators is a feature that is subject to change in a future release....
a.在vscode设置中配置:
b.在项目根目录新建jsconfig.json,添加代码
{
"compilerOptions": {
"experimentalDecorators": true
}
}
重启项目就可以了
问题3:Support for the experimental syntax 'decorators-legacy' isn't currently enabled......
a.npm install babel-plugin-transform-decorators-legacy;
b.修改配置文件,package.json 中加入以下代码:
"plugins": [ ["@babel/plugin-proposal-decorators", { "legacy": true }] ],
* 如果package.json 里面还没有 babel 配置,需要先执行npm run eject