这是我的问题,我使用webpack构建一个反应应用程序,但它给出了这个警告
警告:道具类型失败:需要道具
id
才能使屏幕阅读器等辅助技术的用户可以访问n
。
那怎么解决呢?
webpack代码:
var webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
var path = require('path');
module.exports = {
plugins: [
new webpack.optimize.UglifyJsPlugin(),
new HtmlWebpackPlugin({template: './src/index.html'})
],
entry:{
index: './src/index.js'
},
output:{
path: path.resolve(__dirname, 'dist'),
publicPath: "static/react_veg/dist/",
filename: 'boundle.js'
},
module:{
rules:[
{test: /\.css$/, use: ['style-loader','css-loader'] },
{test: /\.(js|jsx)$/ ,use:'babel-loader'},
{test: /\.(png|jpg)$/, use:'url-loader?limit=8192'}
]
},
resolve:{
alias:{},
extensions:[".js"]
}
}