Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ With this `{rootDir}/src/ui/tsconfig.json`:
- `ipc` (`string`) — the Unix socket to listen to. If `ipc` and `port` are not defined, then the socket `{rootDir}/dist/run/client.sock` is used.
- `port` (`number | true`) — specify a port number to listen for requests on. If `true`, the free port will be selected automatically.
- `webSocketPath` (`string`) — tells clients connected to devServer to use the provided path to connect. Default is `${publicPathPrefix}/build/sockjs-node`.
- `webSocketClientPort` (`number`) - tells clients to connect to devServer using this port from a browser. Default is `${devServer.port}`
- `type` (`'https'`) — allow to serve over HTTPS.
- `options` (`import('https').ServerOptions`) — allow to provide your own certificate.
- `watchOptions` — a set of options used to customize watch mode, [more](https://webpack.js.org/configuration/watch/#watchoptions)
Expand Down
3 changes: 2 additions & 1 deletion src/commands/dev/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
const {publicPath} = config.client;
const {
webSocketPath = path.normalize(`/${publicPath}/sockjs-node`),
webSocketClientPort,
writeToDisk,
...devServer
} = config.client.devServer || {};
Expand Down Expand Up @@ -101,7 +102,7 @@
// Pass a single config to avoid multicompiler when SSR disabled.
const compiler =
bundler === 'rspack'
? rspack(isSsr ? rspackConfigs : rspackConfigs[0]!)

Check warning on line 105 in src/commands/dev/client.ts

View workflow job for this annotation

GitHub Actions / Verify Files

Forbidden non-null assertion
: webpack(webpackConfigs);

const staticFolder = path.resolve(paths.appDist, 'public');
Expand Down Expand Up @@ -139,7 +140,7 @@
hot: true,
client: {
logging: config.verbose ? 'log' : 'error',
webSocketURL: {pathname: webSocketPath},
webSocketURL: {pathname: webSocketPath, port: webSocketClientPort},
overlay: {
runtimeErrors: config.verbose,
warnings: config.verbose,
Expand Down
1 change: 1 addition & 0 deletions src/common/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ interface DevServerConfig {
ipc?: string;
port?: number | true;
webSocketPath?: string;
webSocketClientPort?: number;
type?: 'https';
options?: import('https').ServerOptions;
writeToDisk?: boolean | ((targetPath: string) => boolean);
Expand Down
Loading