34 lines
814 B
TypeScript
34 lines
814 B
TypeScript
import {defineConfig} from 'vite'
|
|
// import {prismjsPlugin} from "vite-plugin-prismjs";
|
|
import vue from '@vitejs/plugin-vue'
|
|
import path from 'path'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
// prismjsPlugin({
|
|
// languages: 'all',
|
|
// plugins: ['line-numbers', 'show-language', 'copy-to-clipboard', 'inline-color'],
|
|
// theme: 'dark',
|
|
// css: true
|
|
// })
|
|
],
|
|
define: {
|
|
'process.env': {...process.env}
|
|
},
|
|
resolve: {
|
|
alias: {'@': path.resolve(__dirname, 'src')},
|
|
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'],
|
|
},
|
|
server: {
|
|
proxy: {
|
|
'/api': {
|
|
target: 'https://cantyonion.site',
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/api/, '')
|
|
}
|
|
}
|
|
},
|
|
})
|