Hippy Debug Server
The package provides the debug server communicated with native(Android apk or iOS Simulator) and the local web development.
Introduction
Some source code is forked from other project. We modified the client implementation, so the injected js code could be run on Hippy.
- The webpack-dev-server folder is forked from webpack-dev-server. We modify all platform related implementation to support Hippy, such like
window
,localtion
, etc. - webpack-dev-server/client-src/hot is forked from webpack. We changed the fallback strategy to live-reload of Hippy.
Usage
@hippy/debug-server
can be installed globally, but install to local in most case.
npm install -g @hippy/debug-server # Install
cd hippy-react-demo # Change to a hippy-react project folder.
hippy-debug # Start the debug server
If you use custom cli, you could customize like this:
const { webpack, startDebugServer } = require('@hippy/debug-server');
// start hippy dev with HMR supported
webpack(webpackConfig, (err, stats) => {
// add you custom callback here...
});
// start hippy debug
startDebugServer();