1234567891011121314151617181920212223242526 |
- import { defineConfig } from "vite";
- import path from "path";
- import uni from "@dcloudio/vite-plugin-uni";
- // https://vitejs.dev/config/
- export default defineConfig(({ mode, command }) => {
- return {
- base: "./", // 打包路径
- server: {
- open: true, // 启动项目自动弹出浏览器
- port: 8080, // 启动端口
- },
- plugins: [uni()],
- resolve: {
- alias: {
- "@/": path.resolve(__dirname, "src"),
- "@/static": path.resolve(__dirname, "src/static"),
- "@/utils": path.resolve(__dirname, "src/utils"),
- },
- },
- configureWebpack: {
- externals: {
- AMap: "AMap",
- },
- },
- };
- });
|