@ris/dev-server
v1.0.5
Published
ris dev server.
Downloads
5
Readme
@ris/dev-server
Dev Server for RIS. Base on webpack-dev-server.
Usage
npm install --save-dev @ris/dev-server
const risDevServer = require('@ris/dev-server');
risDevServer(options)
options
is a plain object that contain:
webpackConfig
: webpack configurationserverConfig
: webpack server configurationonCompileDone
: server compile done hook.onCompileInvalid
: server compile invalid hook.
Example
const risDevServer = require('@ris/dev-server');
const webpackConfig = {
entry: 'src/index.js',
};
const serverConfig = {
port: 3000,
compress: true,
quiet: false,
clientLogLevel: 'none',
disableHostCheck: true,
};
risDevServer({
webpackConfig,
serverConfig,
onCompileDone: () => {
console.log('server is start and compile success!');
},
});