1 Star 0 Fork 0

Cheng/AnyCore-HeadlessDevKit

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vite.config.ts 836 Bytes
一键复制 编辑 原始数据 按行查看 历史
Cheng 提交于 2025-04-18 17:33 +08:00 . :art:style(styles): 主题定制
/// <reference types="vitest" />
import path from 'node:path'
import { defineConfig } from 'vite'
// postcss 插件
import { createPostcssPlugins } from './build/postcssPlugin'
// vite 插件
import { createVitePlugins } from './build/vitePlugin'
export default defineConfig({
plugins: createVitePlugins(),
resolve: {
alias: {
'@': path.join(__dirname, './src'),
},
preserveSymlinks: true, // 关键配置!修复 Windows 符号链接问题
},
css: {
postcss: {
plugins: createPostcssPlugins() as any[],
},
},
build: {
cssCodeSplit: false,
chunkSizeWarningLimit: 2048,
},
base: './', // 打包路径
server: {
port: 5666, // 服务端口号
open: true, // 服务启动时是否自动打开浏览器
cors: true, // 允许跨域
hmr: true, // 热更新
},
})
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/WuCheng-cn/any-core-headless-dev-kit.git
git@gitee.com:WuCheng-cn/any-core-headless-dev-kit.git
WuCheng-cn
any-core-headless-dev-kit
AnyCore-HeadlessDevKit
master

搜索帮助