0.1.3 • Published 5 months ago

@lynx-js/webpack-dev-transport v0.1.3

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
5 months ago

A webpack devServer transport implementation for Lynx.

Client

The client transport can be used in the devServer.client.webSocketTransport configuration of webpack.config.js.

// Copyright 2024 The Lynx Authors. All rights reserved.
// Licensed under the Apache License Version 2.0 that can be found in the
// LICENSE file in the root directory of this source tree.
import { createRequire } from 'node:module';

import { LynxTransportServer } from '@lynx-js/webpack-dev-transport';

const require = createRequire(import.meta.url);
export default {
  devServer: {
    client: {
      webSocketTransport: require.resolve(
        '@lynx-js/webpack-dev-transport/client',
      ),
    },
  },
};

Server

The server transport can be used in the devServer.webSocketServer configuration of webpack.config.js.

// Copyright 2024 The Lynx Authors. All rights reserved.
// Licensed under the Apache License Version 2.0 that can be found in the
// LICENSE file in the root directory of this source tree.
import { LynxTransportServer } from '@lynx-js/webpack-dev-transport';

export default {
  devServer: {
    allowedHosts: 'all', // disable host checks, which Lynx does not support
    webSocketServer: LynxTransportServer,
  },
};
0.1.3

5 months ago

0.1.2

7 months ago

0.1.1

7 months ago

0.1.0

8 months ago