2021-11-03 16:40:31 +00:00
|
|
|
/* eslint-disable import/no-extraneous-dependencies */
|
2022-05-16 19:18:48 +00:00
|
|
|
import vueI18n from '@intlify/vite-plugin-vue-i18n';
|
2021-11-03 16:40:31 +00:00
|
|
|
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';
|
|
|
|
|
2021-12-21 09:52:10 +00:00
|
|
|
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);
|
|
|
|
},
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2021-11-03 16:40:31 +00:00
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
|
|
|
plugins: [
|
|
|
|
vue(),
|
2022-05-16 19:18:48 +00:00
|
|
|
vueI18n({
|
|
|
|
include: path.resolve(__dirname, 'src/assets/locales/**'),
|
|
|
|
}),
|
2021-11-03 16:40:31 +00:00
|
|
|
WindiCSS(),
|
|
|
|
Icons(),
|
|
|
|
svgLoader(),
|
|
|
|
Components({
|
|
|
|
resolvers: IconsResolver(),
|
|
|
|
}),
|
2021-12-21 09:52:10 +00:00
|
|
|
woodpeckerInfoPlugin(),
|
2021-11-03 16:40:31 +00:00
|
|
|
],
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
'~/': `${path.resolve(__dirname, 'src')}/`,
|
|
|
|
},
|
|
|
|
},
|
2021-12-21 09:52:10 +00:00
|
|
|
logLevel: 'warn',
|
|
|
|
server: {
|
|
|
|
port: 8010,
|
|
|
|
},
|
2021-11-03 16:40:31 +00:00
|
|
|
});
|