标签:
//entry.js require("!style!css!./style.css"); require("./hello.jsx"); // document.write("It works."); document.write(require("./content.js"));
//hello.jsx var React = require(‘react‘); var e = document.createElement(‘div‘); e.id=‘example‘; document.body.appendChild(e); React.render( <h1>Hello, world!</h1>, document.getElementById(‘example‘) );
module.exports = { entry: "./entry.js", output: { path: __dirname, filename: "bundle.js" }, module: { loaders: [ { test: /\.css$/, loader: "style!css" }, { test: /\.jsx$/, loader: "jsx-loader" } ] } };
http://jslog.com/2014/10/02/react-with-webpack-part-1/
http://gaearon.github.io/react-hot-loader/getstarted/
标签:
原文地址:http://www.cnblogs.com/zyip/p/4707141.html