如下图所示
报错图我们查看报错信息时候,笔者最开始以为是antd引入报错,后来仔细观察了下面的提示信息,找到报错的根源在于
Inline JavaScript is not enabled. Is it set in your options
所以,修改了webpack.config.js文件中,less的配置,如下图红色框体内容所示
修改代码图修改完毕,yarn start运行成功
附加几个包的版本信息:
"webpack": "4.44.2",
"webpack-dev-server": "3.11.0",
"webpack-manifest-plugin": "2.2.0",
"workbox-webpack-plugin": "5.1.4"
"less": "^4.0.0",
"less-loader": "^5.0.0",
"@babel/core": "7.12.3",
网友评论