2021-02-24 06:04:09 +08:00
|
|
|
import path from "path";
|
|
|
|
import { defineConfig } from "vite";
|
|
|
|
import { createVuePlugin } from "vite-plugin-vue2";
|
|
|
|
import ViteComponents from "vite-plugin-components";
|
|
|
|
import WindiCSS from "vite-plugin-windicss";
|
2021-02-28 04:13:36 +08:00
|
|
|
import ViteIcons, { ViteIconsResolver } from "vite-plugin-icons";
|
2021-02-24 06:04:09 +08:00
|
|
|
|
|
|
|
const config = defineConfig({
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
"@": `${path.resolve(__dirname, "src")}`,
|
|
|
|
},
|
2021-02-26 17:05:10 +08:00
|
|
|
dedupe: ["vue-demi"],
|
2021-02-24 06:04:09 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
build: {
|
|
|
|
minify: true,
|
|
|
|
},
|
|
|
|
|
|
|
|
plugins: [
|
2021-02-28 04:13:36 +08:00
|
|
|
createVuePlugin(),
|
|
|
|
ViteComponents({
|
|
|
|
customComponentResolvers: [
|
|
|
|
ViteIconsResolver({
|
|
|
|
componentPrefix: "",
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
}),
|
|
|
|
ViteIcons({
|
|
|
|
defaultStyle: "",
|
|
|
|
}),
|
2021-02-24 06:04:09 +08:00
|
|
|
WindiCSS(),
|
|
|
|
],
|
|
|
|
|
|
|
|
server: {
|
|
|
|
port: 8080,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
export default config;
|