mirror of
https://github.com/tsl0922/ttyd.git
synced 2026-02-12 04:54:23 +01:00
19 lines
513 B
JavaScript
19 lines
513 B
JavaScript
/**
|
|
* Function that mutates original webpack config.
|
|
* Supports asynchronous changes when promise is returned.
|
|
*
|
|
* @param {object} config - original webpack config.
|
|
* @param {object} env - options passed to CLI.
|
|
* @param {WebpackConfigHelpers} helpers - object with useful helpers when working with config.
|
|
**/
|
|
export default function (config, env, helpers) {
|
|
const { devServer } = config;
|
|
if (devServer) {
|
|
devServer.proxy = {
|
|
'/ws': {
|
|
target: 'ws://127.0.0.1:7681',
|
|
ws: true
|
|
},
|
|
};
|
|
}
|
|
} |