0.2.0 • Published 10 years ago
autohost-webpack-hot v0.2.0
autohost-webpack-hot
This is a very simple plugin for autohost to wire up webpack (and babel supported) hot-reloading.
Usage
Install
npm install autohost-webpack-hot --saveIntegrate with Autohost
var autohost = require( "autohost" );
var fount = require( "fount" );
var webpackConfig = require( "./webpack.config.js" );
var webpackCompiler = require( "webback" )( webpackConfig );
// Any settings to pass to webpack-dev-server
webpackCompiler._middlewareConfig = {
stats: {
colors: true
}
};
fount.register( "webpackCompiler", webpackCompiler );
var host = autohost( {
modules: [ "autohost-webpack-hot" ]
} );
host.start();Follow the rest of the example from react-transform-boilerplate - This autohost plugin will just handle serving the files. The following two files are included for reference.
Tests
Single Run
npm testContinuous Run with Coverage
gulpNotes
- Be sure to setup the
.babelrccorrectly to reference the react transform plugins.
License
MIT