mirror of
https://github.com/wassname/generator-react-webpack.git
synced 2026-09-09 11:22:44 +08:00
Backport https://github.com/gaearon/react-hot-boilerplate/commit/58dddfd80d7a39083195a8da68849b5c898d9e8c
This commit is contained in:
@@ -19,7 +19,7 @@ module.exports = {
|
|||||||
debug: true,
|
debug: true,
|
||||||
devtool: false,
|
devtool: false,
|
||||||
entry: [
|
entry: [
|
||||||
'webpack/hot/dev-server',
|
'webpack/hot/only-dev-server',
|
||||||
'./src/scripts/components/<%= pkg.mainInput %>.jsx'
|
'./src/scripts/components/<%= pkg.mainInput %>.jsx'
|
||||||
],
|
],
|
||||||
|
|
||||||
@@ -52,7 +52,8 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
new webpack.HotModuleReplacementPlugin()
|
new webpack.HotModuleReplacementPlugin(),
|
||||||
|
new webpack.NoErrorsPlugin()
|
||||||
]
|
]
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -101,7 +101,8 @@ describe('react-webpack generator', function() {
|
|||||||
['Gruntfile.js', /hot:\s*true/],
|
['Gruntfile.js', /hot:\s*true/],
|
||||||
['webpack.config.js', /react-hot/],
|
['webpack.config.js', /react-hot/],
|
||||||
['webpack.config.js', /webpack\.HotModuleReplacementPlugin/],
|
['webpack.config.js', /webpack\.HotModuleReplacementPlugin/],
|
||||||
['webpack.config.js', /webpack\/hot\/dev-server/]
|
['webpack.config.js', /webpack\.NoErrorsPlugin/],
|
||||||
|
['webpack.config.js', /webpack\/hot\/only-dev-server/]
|
||||||
]);
|
]);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user