haimian_landing/vite.config.js

39 lines
780 B
JavaScript

import { defineConfig } from "vite";
import { resolve } from "path";
import copy from "rollup-plugin-copy";
export default defineConfig({
base: "./",
plugins: [
// copy({
// verbose: true,
// hook: "closeBundle",
// targets: [{ src: "readme.md", dest: "dist", rename: "readme.md" }],
// }),
],
terserOptions: {
compress: {
drop_console: true,
},
},
build: {
outDir: "dist",
emptyOutDir: true,
rollupOptions: {
input: {
main: resolve(__dirname, "index.html"),
},
output: {
entryFileNames: "[name].js",
chunkFileNames: "[name].js",
assetFileNames: `[name].[ext]`,
},
},
},
resolve: {
alias: {
"@": resolve(__dirname, "./src"),
},
},
});