feat: improve vnc console

Signed-off-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
Andy Lee
2026-09-09 19:17:22 +08:00
parent bbe0c4643f
commit 96c374b7aa
10 changed files with 774 additions and 519 deletions
+24 -1
View File
@@ -1 +1,24 @@
module.exports = require('@rancher/shell/pkg/vue.config')(__dirname);
const path = require('path');
const baseConfig = require('@rancher/shell/pkg/vue.config')(__dirname);
const baseConfigureWebpack = baseConfig.configureWebpack;
// noVNC >= 1.7 only publishes `./core/rfb.js` in its `exports` map, so resolve the
// package by path to keep the keysym/input helpers importable.
const NOVNC_DIR = path.resolve(__dirname, '..', '..', 'node_modules', '@novnc', 'novnc');
module.exports = {
...baseConfig,
configureWebpack(config) {
if (typeof baseConfigureWebpack === 'function') {
baseConfigureWebpack(config);
}
config.resolve.alias['@novnc/novnc'] = NOVNC_DIR;
// noVNC 1.7 uses top-level await for WebCodecs detection.
config.output = { ...config.output, environment: { ...config.output?.environment, asyncFunction: true } };
}
};