mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-24 05:03:17 -05:00
a3ab301cff
If libevent >= 2.2 is detected during configure and "websocket_port" == 0 in the config file, the libwebsocket implementation is disabled and instead the libevent http server offers the websocket connection. The connection to the websocket is then done with the path "/ws".
48 lines
1.1 KiB
JavaScript
48 lines
1.1 KiB
JavaScript
import { defineConfig } from 'vite'
|
|
import i18n from '@intlify/unplugin-vue-i18n/vite'
|
|
import path from 'path'
|
|
import vue from '@vitejs/plugin-vue'
|
|
|
|
/*
|
|
* In development mode, use the VITE_OWNTONE_URL environment variable to set
|
|
* the remote OwnTone server URL. For example:
|
|
*
|
|
* export VITE_OWNTONE_URL=http://owntone.local:3689; npm run serve
|
|
*/
|
|
const target = process.env.VITE_OWNTONE_URL ?? 'http://localhost:3689'
|
|
|
|
export default defineConfig({
|
|
build: {
|
|
outDir: '../htdocs',
|
|
rollupOptions: {
|
|
output: {
|
|
assetFileNames: `assets/[name].[ext]`,
|
|
chunkFileNames: `assets/[name].js`,
|
|
entryFileNames: `assets/[name].js`
|
|
}
|
|
}
|
|
},
|
|
css: {
|
|
preprocessorOptions: {
|
|
scss: {
|
|
api: 'modern'
|
|
}
|
|
}
|
|
},
|
|
plugins: [
|
|
vue(),
|
|
i18n({
|
|
include: path.resolve(__dirname, './src/i18n/**.json')
|
|
})
|
|
],
|
|
resolve: { alias: { '@': '/src' } },
|
|
server: {
|
|
proxy: {
|
|
'/api': { target },
|
|
'/ws': { target: target, ws: true },
|
|
'/artwork': { target },
|
|
'/stream.mp3': { target }
|
|
}
|
|
}
|
|
})
|