shack/vite.config.js

24 lines
511 B
JavaScript

import config from 'config';
import vue from '@vitejs/plugin-vue';
import ssr from 'vite-plugin-ssr/plugin';
import markdown from 'vite-plugin-vue-markdown';
import pkg from './package.json';
import clientConfig from './assets/js/config/local';
export default {
plugins: [
vue({ include: [/\.vue$/, /\.md$/] }),
markdown(),
ssr(),
],
define: {
CLIENT_VERSION: JSON.stringify(pkg.version),
CONFIG: JSON.stringify({
captchaEnabled: config.auth.captcha.enabled,
...clientConfig,
}),
},
};