react npm + webpack 搭建错误

学习用npm管理react,用webpack打包,配置完npm start 的时候出错了。
package.json是这样的:

{
  "name": "react-webpack",
  "version": "1.0.0",
  "description": "practice",
  "main": "index.js",
  "scripts": {
   "start":"node server.js"
  },
  "keywords": [
    "react",
    "webpack"
  ],
  "author": "lxy",
  "license": "ISC",
  "dependencies": {
    "babel": "^6.5.2",
    "babel-core": "^6.10.4",
    "react": "^15.1.0",
    "react-dom": "^15.1.0",
    "webpack": "^1.13.1"
  },
  "devDependencies": {
    "react-hot-loader": "^1.3.0",
    "webpack-dev-server": "^1.14.1"
  }
}

webpackage.config.js这样的:

 
     var webpack = require('webpack');

    module.exports={
    entry:'./js/index.js',
    output:{
        path:_dirname + '/js/',
        filename:'bundle.js',
        publicPath: '/js/'
    },
    module:{
        loaders:[
            {test:/\.js$/,loaders: ['babel-loader'],exclude: /node_modules/}
        ]
    },
    resolve:{
        extensions:['','.js','.jsx']
    }
};

server.js:


var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var config = require('webpack.config.js');

new WebpackDevServer(webpack(config),{
    publicPath: config.output.publicPath,
    hot:true,
    historyApiFallback: true
}).listen(3333,'localhost',function(err,result){
        if(err){
            console.log(err);
        }
        console.log('Listen at localhost:3333');
    });
    

index.js

var React = require('react');    
var HelloWorld = React.createClass({
    render:function(){
        return (
            <h1>helloworld!!</h1>
        );
    }
});
ReactDOM.render(<HelloWorld />,document.getElementById("app"));

错误信息:

server.js里这句话改改:

var config = require('./webpack.config.js');//用相对路径
  • webpack-dev-server访问的是本地文件,不能自动刷新,看下配置有问题不?
  • webpack通过webpack-dev-server来启动一个服务器时报错,cannot find module open
  • 用es6语法编写react jsx,使用gulp-babel编译失败?
  • webpakc打包图片的时候出现问题,求解决。
  • 为什么单页应用看起来很火,但都没有看到大厂们的产品在用?
  • react 里面 的form 不是这么用的?
  • 请叫ReactJS 中的map方法 和 forEach方法有什么区别
  • react做表格多列
  • Atom的language-babel插件编译ES6依赖哪些node模块?
  • react.js中使用react-bootstrap时,怎样自定义样式
  • react怎样实现路由,类比angularjs中的实现路由控制的方法