-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvite.config.js
More file actions
31 lines (29 loc) · 789 Bytes
/
vite.config.js
File metadata and controls
31 lines (29 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import cssInjectedByJsPlugin from 'vite-plugin-css-injected-by-js';
import { defineConfig } from "vite";
import pkg from "./package.json";
const banner = `/**
* @author ${pkg.author}
* @name ${pkg.name}
* @link ${pkg.homepage}
* @description ${pkg.description}
* @version ${pkg.version}
* @license ${pkg.license}
*/`;
export default defineConfig({
plugins: [cssInjectedByJsPlugin()],
build: {
outDir: "dist",
rollupOptions: {
input: "src/index.js",
output: {
entryFileNames: "index.js",
assetFileNames: "assets/[name][extname]",
chunkFileNames: "chunks/[name][extname]",
}
},
},
esbuild: {
banner: banner,
legalComments: "none",
},
});