1 Star 1 Fork 0

lineo/fruit-stall

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vite.config.ts 860 Bytes
一键复制 编辑 原始数据 按行查看 历史
lineo 提交于 2024-04-30 15:45 . feat: 配置环境变量及打包base路径
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { resolve } from "path";
import Components from "unplugin-vue-components/vite";
import { VantResolver } from "@vant/auto-import-resolver";
import { VueHooksPlusResolver } from "@vue-hooks-plus/resolvers";
const pathResolve = (dir: string): any => {
return resolve(__dirname, ".", dir);
};
const alias: Record<string, string> = {
"@": pathResolve("src"),
};
export default defineConfig({
base: "./",
plugins: [
vue(),
Components({
resolvers: [VantResolver(), VueHooksPlusResolver()],
}),
],
define: {
"process.env": {},
},
server: {
host: "0.0.0.0",
port: 8130,
},
resolve: {
alias,
},
css: {
preprocessorOptions: {
scss: {
additionalData: `@import "@/assets/variable.scss";`,
},
},
},
});
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lineo0628/fruit-stall.git
git@gitee.com:lineo0628/fruit-stall.git
lineo0628
fruit-stall
fruit-stall
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385