1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- import {
- defineConfig,
- } from 'vite';
- import vue from '@vitejs/plugin-vue';
- import ViteComponents from 'vite-plugin-components';
- import path from 'path';
- // https://vitejs.dev/config/
- export default defineConfig({
- base: '/gongdian-map/',
- resolve: {
- alias: {
- '@': path.resolve(__dirname, 'src'),
- },
- },
- plugins: [
- vue(),
- ViteComponents({
- libraryName: 'ant-design-vue',
- libraryDirectory: 'es',
- style: 'less',
- }),
- ],
- css: {
- preprocessorOptions: {
- less: {
- // 支持内联 JavaScript
- javascriptEnabled: true,
- // 重写 less 变量,定制样式
- modifyVars: {
- 'primary-color': '#16D8FF',//全局主色
- 'text-color': '#16D8FF', // 主文本色
- 'font-size-base': '14rem', // 基础字号大小
- 'tabs-title-font-size': '14rem',
- 'tabs-vertical-padding': '8rem 12rem',
- 'heading-color': 'white',
- 'body-background': 'rgba(11, 47, 91, 1)',//背景颜色
- 'component-background': 'rgba(11, 47, 91, 1)',//主要背景颜色
- 'item-hover-bg': 'rgba(11, 47, 91, 1)',
- 'item-active-bg': 'rgba(11, 47, 91, 1)',
- 'select-item-selected-color': '#f5ed38',
- 'select-item-selected-bg': '#e6ffff00',
- 'border-color-inverse': '#16D8FF',
- },
- },
- },
- },
- build: {
- outDir: 'gongdian-map',
- minify: false,
- sourcemap: false,
- },
- });
|