mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-01 03:36:04 +08:00
27 lines
872 B
JavaScript
27 lines
872 B
JavaScript
const path = require('path');
|
|
const config = require('@rancher/shell/vue.config');
|
|
|
|
const baseConfig = config(__dirname, {
|
|
excludes: [],
|
|
// excludes: ['harvester']
|
|
});
|
|
|
|
const baseConfigureWebpack = baseConfig.configureWebpack;
|
|
|
|
module.exports = {
|
|
...baseConfig,
|
|
|
|
configureWebpack(webpackConfig) {
|
|
if (typeof baseConfigureWebpack === 'function') {
|
|
baseConfigureWebpack(webpackConfig);
|
|
}
|
|
|
|
// 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.
|
|
webpackConfig.resolve.alias['@novnc/novnc'] = path.resolve(__dirname, 'node_modules/@novnc/novnc');
|
|
|
|
// noVNC 1.7 uses top-level await for WebCodecs detection.
|
|
webpackConfig.output = { ...webpackConfig.output, environment: { ...webpackConfig.output?.environment, asyncFunction: true } };
|
|
}
|
|
};
|