generated from tasshi-me/kintone-devCamp-Boost-2023
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
42 lines (37 loc) · 1002 Bytes
/
vite.config.ts
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
40
41
42
import { defineConfig } from "vite";
import path, { resolve } from "path";
import fs from "fs";
import license from "rollup-plugin-license";
const licenseText = fs.readFileSync(path.join(__dirname, "LICENSE"), "utf-8");
const licenseTemplate = `
Bundle of <%= pkg.name %>
Generated: <%= moment().format('YYYY-MM-DD') %>
Version: <%= pkg.version %>
${licenseText}
This bundle includes the following third-party libraries:
<% _.forEach(dependencies, function (dependency) { %>
=====
<%= dependency.name %>@<%= dependency.version %> -- <%= dependency.license %>
-----
<%= dependency.licenseText %>
<% }) %>
`;
export default defineConfig({
build: {
lib: {
name: "MyKintoneCustomize",
entry: resolve(__dirname, "src/main.ts"),
fileName: "my-kintone-customize",
},
rollupOptions: {
plugins: [
license({
banner: {
commentStyle: "ignored",
content: licenseTemplate,
},
}),
],
},
},
});