2021-02-24 06:04:09 +08:00
|
|
|
import path from "path";
|
|
|
|
import { defineConfig } from "vite";
|
|
|
|
import { createVuePlugin } from "vite-plugin-vue2";
|
|
|
|
import WindiCSS from "vite-plugin-windicss";
|
2021-09-12 03:34:35 +08:00
|
|
|
import Components from "unplugin-vue-components/vite";
|
|
|
|
import Icons from "unplugin-icons/vite";
|
|
|
|
import IconsResolver from "unplugin-icons/resolver";
|
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(),
|
2021-09-12 03:34:35 +08:00
|
|
|
WindiCSS(),
|
|
|
|
Components({
|
|
|
|
resolvers: [
|
|
|
|
IconsResolver({
|
2021-02-28 04:13:36 +08:00
|
|
|
componentPrefix: "",
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
}),
|
2021-09-12 03:34:35 +08:00
|
|
|
Icons(),
|
2021-02-24 06:04:09 +08:00
|
|
|
],
|
|
|
|
|
|
|
|
server: {
|
|
|
|
port: 8080,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
export default config;
|