Skip to content

Instantly share code, notes, and snippets.

@ToJans
Last active August 29, 2015 14:19
Show Gist options
  • Save ToJans/a422f47a2313deb90404 to your computer and use it in GitHub Desktop.
Save ToJans/a422f47a2313deb90404 to your computer and use it in GitHub Desktop.
Edit-and-continue for client-side web apps with react
{
"name": "SalesDesigner",
"version": "0.0.0",
"description": "Sales designer",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Core bvba",
"license": "",
"devDependencies": {
"babel-loader": "^5.0.0",
"react-hot-loader": "^1.2.5",
"react-tools": "^0.13.1",
"webpack": "^1.8.6"
},
"dependencies": {
"react-modal": "^0.1.1"
}
}
webpack-dev-server --hot --inline
start http://localhost:8080/webpack-dev-server/
var path = require('path');
module.exports = {
entry: './app/main.jsx',
output: {
filename: 'app.js',
path: path.join(__dirname,'build'),
publicPath: '/build/'
},
module: {
loaders: [
{ test: /\.css$/, loader: "style!css" },
{ test: /\.jsx?$/,
exclude: /node_modules/,
loaders: ['react-hot','babel-loader']
}
]
},
resolve: {
extensions: ['', '.js', '.jsx']
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment