1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/pengxiaotian-datav-vue

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
vite.config.ts 1.9 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
Allen Отправлено 10.12.2022 16:23 18933dc
import type { ConfigEnv } from 'vite'
import { loadEnv, defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import ElementPlus from 'unplugin-element-plus/vite'
import plainText from 'vite-plugin-plain-text'
import { resolve } from 'path'
function pathResolve(dir: string) {
return resolve(process.cwd(), '.', dir)
}
// https://vitejs.dev/config/
export default ({ mode }: ConfigEnv) => {
const dirRoot = process.cwd()
const env = loadEnv(mode, dirRoot)
return defineConfig({
base: env.VITE_PUBLIC_PATH,
plugins: [
vue(),
ElementPlus(),
plainText(/\.hbs$/),
],
server: {
host: '0.0.0.0',
port: 9096,
},
resolve: {
alias: {
'@': pathResolve('./src'),
'vue-i18n': pathResolve('./node_modules/vue-i18n/dist/vue-i18n.cjs.js'),
},
},
define: {
// setting vue-i18-next
// Suppress warning
__INTLIFY_PROD_DEVTOOLS__: false,
__DEV__: process.env.NODE_ENV !== 'production',
__PROD__: process.env.NODE_ENV === 'production',
},
optimizeDeps: {
include: [
'@monaco-editor/loader',
'accounting',
'axios',
'axios-mock-adapter',
'crypto-js',
'dayjs',
'echarts',
'echarts-wordcloud',
'element-plus',
'gsap',
'html2canvas',
'js-cookie',
'lodash-es',
'mockjs',
'monaco-editor',
'naive-ui',
'number-precision',
'particles.vue3',
'shortid',
'vue',
'vue-echarts',
'vue-i18n',
'vue-router',
],
exclude: [],
},
build: {
sourcemap: false,
outDir: 'website',
rollupOptions: {
input: {
main: resolve(__dirname, 'index.html'),
share: resolve(__dirname, 'index.share.html'),
},
},
},
esbuild: {
},
})
}
1
https://api.gitlife.ru/oschina-mirror/pengxiaotian-datav-vue.git
git@api.gitlife.ru:oschina-mirror/pengxiaotian-datav-vue.git
oschina-mirror
pengxiaotian-datav-vue
pengxiaotian-datav-vue
main