Class for setting up and running development server for React Native application. It's usually created by the DevServerPlugin.
Each DevServer
instance is platform-specific, for example for ios
and android
platforms,
you need 2 DevServer
running (on different ports). Alternatively you can
use DevServerProxy to spawn new processes with Webpack compilations for each platform.
↳ DevServer
• new DevServer(config
, compiler
)
Constructs new DevServer
instance.
Name | Type | Description |
---|---|---|
config |
DevServerConfig |
Configuration options. |
compiler |
Compiler |
Webpack compiler instance. |
packages/repack/src/server/DevServer.ts:66
• Protected
config: BaseDevServerConfig
Configuration options.
packages/repack/src/server/BaseDevServer.ts:35
• fastify: FastifyDevServer
Fastify instance.
packages/repack/src/server/BaseDevServer.ts:38
• hmrServer: WebSocketHMRServer
HMR WebSocket server instance to allow HMR clients to receive updates.
packages/repack/src/server/DevServer.ts:54
• symbolicator: Symbolicator
Symbolicator instance to transform stack traces using Source Maps.
packages/repack/src/server/DevServer.ts:58
• wdm: WebpackDevMiddleware
webpack-dev-middleware instance.
packages/repack/src/server/DevServer.ts:52
• wsClientServer: WebSocketDevClientServer
Server instance for React Native clients.
packages/repack/src/server/BaseDevServer.ts:48
• wsDashboardServer: WebSocketDashboardServer
Dashboard WebSocket server instance to provide events to dashboard web client.
packages/repack/src/server/DevServer.ts:56
• wsDebuggerServer: WebSocketDebuggerServer
Debugger server instance.
BaseDevServer.wsDebuggerServer
packages/repack/src/server/BaseDevServer.ts:42
• wsEventsServer: WebSocketEventsServer
Events server instance.
packages/repack/src/server/BaseDevServer.ts:46
• wsMessageServer: WebSocketMessageServer
Message server instance.
packages/repack/src/server/BaseDevServer.ts:44
• wsRouter: WebSocketRouter
WebSocket router instance.
packages/repack/src/server/BaseDevServer.ts:40
▸ run(): Promise
<void
>
Runs development server.
Promise
<void
>
packages/repack/src/server/DevServer.ts:198
▸ setup(): Promise
<void
>
Sets up Fastify plugins and routes.
Promise
<void
>