Disabled webpack HMR. See #2

This commit is contained in:
Michel Weststrate 2016-03-14 10:27:34 +01:00
parent 162f722ef9
commit 6c0878487f
3 changed files with 6 additions and 10 deletions

View file

@ -7,3 +7,5 @@ Initial run:
* Install Node.js * Install Node.js
* `npm install` * `npm install`
* `npm start` * `npm start`
For simplicity sake Webpack Hot Module Reloading is disabled. If you want to use HMR, see the [Reactive2015 demo](https://github.com/mobxjs/mobx-reactive2015-demo) to see a valid setup.

View file

@ -23,16 +23,15 @@
}, },
"homepage": "http://mobxjs.github.com/mobx", "homepage": "http://mobxjs.github.com/mobx",
"devDependencies": { "devDependencies": {
"react-hot-loader": "^2.0.0-alpha-4",
"ts-loader": "^0.8.1", "ts-loader": "^0.8.1",
"typescript": "^1.8.2", "typescript": "^1.8.2",
"webpack": "^1.9.6", "webpack": "^1.9.6",
"webpack-dev-server": "^1.8.2" "webpack-dev-server": "^1.8.2"
}, },
"dependencies": { "dependencies": {
"mobx": "^2.0.0", "mobx": "^2.0.2",
"mobx-react": "^3.0.0", "mobx-react": "^3.0.1",
"mobx-react-devtools": "^4.0.1", "mobx-react-devtools": "^4.0.2",
"react": "^0.14.0", "react": "^0.14.0",
"react-dom": "^0.14.0" "react-dom": "^0.14.0"
} }

View file

@ -5,7 +5,6 @@ module.exports = {
devtool: 'eval', devtool: 'eval',
entry: [ entry: [
'webpack-dev-server/client?http://localhost:3000', 'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/only-dev-server',
'./src/index' './src/index'
], ],
output: { output: {
@ -13,17 +12,13 @@ module.exports = {
filename: 'bundle.js', filename: 'bundle.js',
publicPath: '/static/' publicPath: '/static/'
}, },
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
],
resolve: { resolve: {
extensions: ['', '.js', '.ts', '.tsx'] extensions: ['', '.js', '.ts', '.tsx']
}, },
module: { module: {
loaders: [{ loaders: [{
test: /\.tsx?$/, test: /\.tsx?$/,
loaders: ['react-hot', 'ts-loader'], loaders: ['ts-loader'],
include: path.join(__dirname, 'src') include: path.join(__dirname, 'src')
}] }]
} }