mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-12 08:23:48 +02:00
46 lines
1.1 KiB
TypeScript
46 lines
1.1 KiB
TypeScript
/* eslint-disable import/no-extraneous-dependencies */
|
|
import vue from '@vitejs/plugin-vue';
|
|
import path from 'path';
|
|
import IconsResolver from 'unplugin-icons/resolver';
|
|
import Icons from 'unplugin-icons/vite';
|
|
import Components from 'unplugin-vue-components/vite';
|
|
import { defineConfig } from 'vite';
|
|
import WindiCSS from 'vite-plugin-windicss';
|
|
import svgLoader from 'vite-svg-loader';
|
|
|
|
function woodpeckerInfoPlugin() {
|
|
return {
|
|
name: 'woodpecker-info',
|
|
configureServer() {
|
|
const info =
|
|
'Please add `WOODPECKER_DEV_WWW_PROXY=http://localhost:8010` to your `.env` file.\n' +
|
|
'After starting the woodpecker server as well you should now be able to access the UI at http://localhost:8000/';
|
|
// eslint-disable-next-line no-console
|
|
console.log(info);
|
|
},
|
|
};
|
|
}
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
WindiCSS(),
|
|
Icons(),
|
|
svgLoader(),
|
|
Components({
|
|
resolvers: IconsResolver(),
|
|
}),
|
|
woodpeckerInfoPlugin(),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'~/': `${path.resolve(__dirname, 'src')}/`,
|
|
},
|
|
},
|
|
logLevel: 'warn',
|
|
server: {
|
|
port: 8010,
|
|
},
|
|
});
|