Webpack构建警告

时间:2017-04-28 12:44:03

标签: reactjs webpack

这是我的问题,我使用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"]
  }
}

0 个答案:

没有答案