mirror of
https://github.com/lstoeferle/vite-vue2-starter
synced 2025-02-23 21:22:18 +08:00
30 lines
531 B
JavaScript
30 lines
531 B
JavaScript
|
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";
|
||
|
|
||
|
const config = defineConfig({
|
||
|
resolve: {
|
||
|
alias: {
|
||
|
"@": `${path.resolve(__dirname, "src")}`,
|
||
|
},
|
||
|
},
|
||
|
|
||
|
build: {
|
||
|
minify: true,
|
||
|
},
|
||
|
|
||
|
plugins: [
|
||
|
createVuePlugin({}),
|
||
|
ViteComponents({ transformer: "vue2" }),
|
||
|
WindiCSS(),
|
||
|
],
|
||
|
|
||
|
server: {
|
||
|
port: 8080,
|
||
|
},
|
||
|
});
|
||
|
|
||
|
export default config;
|