You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
627 B
36 lines
627 B
import uni from "@dcloudio/vite-plugin-uni"; // !此依赖不能安装
|
|
import path from "path";
|
|
import { defineConfig } from "vite";
|
|
import { cool } from "@cool-vue/vite-plugin";
|
|
import { proxy } from "./config/proxy";
|
|
|
|
function resolve(dir: string) {
|
|
return path.resolve(__dirname, dir);
|
|
}
|
|
|
|
// https://vitejs.dev/config
|
|
|
|
export default defineConfig(() => {
|
|
return {
|
|
plugins: [
|
|
uni(),
|
|
cool({
|
|
type: "app",
|
|
proxy,
|
|
}),
|
|
],
|
|
server: {
|
|
port: 9900,
|
|
proxy,
|
|
hmr: {
|
|
overlay: true,
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"/@": resolve("./"),
|
|
"/$": resolve("./uni_modules/"),
|
|
},
|
|
},
|
|
};
|
|
});
|
|
|