-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
29 lines (27 loc) · 844 Bytes
/
vite.config.ts
File metadata and controls
29 lines (27 loc) · 844 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
// vite.config.ts
import { defineConfig } from 'vite';
import path from 'path';
import banner from 'vite-plugin-banner';
import packageJson from './package.json';
const year = new Date().getFullYear();
const puiHeader = [
'/* **********************************************',
` ${packageJson.otherDetails.properName} v${packageJson.version}\n`,
` ${packageJson.description} (${packageJson.homepage})`,
` ©${year} ${packageJson.author}`,
` Released under the ${packageJson.license} license.`,
'********************************************** */',
'',
].join('\n');
export default defineConfig({
plugins: [
banner(puiHeader)
],
build: {
lib: {
entry: path.resolve(__dirname, 'default.js'),
name: `${packageJson.otherDetails.properName}`,
fileName: () => `${packageJson.name}.js`,
},
},
});