-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvite.config.js
39 lines (37 loc) · 965 Bytes
/
vite.config.js
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
32
33
34
35
36
37
38
39
// vite.config.js
const { defineConfig } = require('vite');
const path = require('path');
import banner from 'vite-plugin-banner';
import copy from 'rollup-plugin-copy';
import handlebars from 'vite-plugin-handlebars';
const pjson = require('./package.json');
const year = new Date().getFullYear();
const puiHeader = [
'/*',
' Platform Icons v' + pjson.version + ' | ' + pjson.name + '\n',
' ' + pjson.description + ' (' + pjson.homepage + ')',
' ©' + year + ' ' + pjson.author,
' ' + pjson.bugs.url,
' Released under the ' + pjson.license + ' license.',
'*/',
'',
].join('\n');
export default defineConfig({
plugins: [
banner(puiHeader),
handlebars()
],
build: {
lib: {
entry: path.resolve(__dirname, 'main.js'),
name: 'PlatformIcons',
fileName: 'platform-icons',
formats: ['umd'],
},
rollupOptions: {
output: {
assetFileNames: "platform-icons.[ext]",
},
}
},
});