39 Star 131 Fork 56

Oliver/thingsboard-ui-vue3

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vite.config.ts 1.27 KB
一键复制 编辑 原始数据 按行查看 历史
Oliver 提交于 2024-11-05 17:36 . update
/**
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* No deletion without permission, or be held responsible to law.
* @author ThinkGem
*/
import type { UserConfig, ConfigEnv } from 'vite';
import { defineConfig, loadEnv } from 'vite';
import { readPackageJSON } from 'pkg-types';
import { resolve } from 'node:path';
import {
createBuildOptions,
createCSSOptions,
createDefineOptions,
createEsBuildOptions,
createServerOptions,
createVitePlugins,
wrapperEnv,
} from './build';
export default defineConfig(async ({ command, mode }: ConfigEnv) => {
const root = process.cwd();
const isBuild = command === 'build';
const viteEnv = wrapperEnv(loadEnv(mode, root));
const pkg = await readPackageJSON(root);
const pathResolve = (pathname: string) => resolve(root, '.', pathname);
const config: UserConfig = {
root,
base: viteEnv.VITE_PUBLIC_PATH,
define: createDefineOptions(pkg),
plugins: createVitePlugins(isBuild, viteEnv, pkg),
server: createServerOptions(viteEnv),
esbuild: createEsBuildOptions(mode),
build: createBuildOptions(viteEnv),
css: createCSSOptions(),
resolve: {
alias: {
'/@/': pathResolve('src') + '/',
'/#/': pathResolve('types') + '/',
},
},
};
return config;
});
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/oliver225/thingsboard-ui-vue3.git
[email protected]:oliver225/thingsboard-ui-vue3.git
oliver225
thingsboard-ui-vue3
thingsboard-ui-vue3
master

搜索帮助