neko/vue.config.js
Miroslav Šedivý 0371a7dc4c
Add NoVnc keyboard (#13)
* novnc wip.

* remove blacklistKeys.

* eslint ignore all js files.

* ad common keyboard interface.

* upgrade novnc.

* fix novnc.

* fix novnc keyboard.

* fix keyboard remapping.

* conditionally include novnc at build time.
2022-10-04 20:28:07 +02:00

32 lines
718 B
JavaScript

const path = require('path')
const webpack = require('webpack')
module.exports = {
productionSourceMap: false,
configureWebpack: {
resolve: {
alias: {
vue$: 'vue/dist/vue.esm.js',
'~': path.resolve(__dirname, 'src/'),
},
},
plugins: [
new webpack.NormalModuleReplacementPlugin(
/(.*)__KEYBOARD__/,
function(resource){
resource.request = resource.request
.replace(/__KEYBOARD__/, process.env.KEYBOARD || 'guacamole');
},
),
],
},
devServer: {
allowedHosts: "all",
proxy: {
'^/api': {
target: 'http://' + process.env.NEKO_HOST + ':' + process.env.NEKO_PORT + '/',
},
},
},
}