forked from readium/ts-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
30 lines (29 loc) · 938 Bytes
/
Copy pathvite.config.js
File metadata and controls
30 lines (29 loc) · 938 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
import { resolve } from "path";
import { defineConfig } from "vite";
import packageJson from "./package.json";
export default defineConfig({
build: {
rollupOptions: {
input: [
resolve(__dirname, "src/index.ts"),
resolve(__dirname, "src/publication/html/index.ts"),
resolve(__dirname, "src/publication/epub/index.ts"),
resolve(__dirname, "src/publication/opds/index.ts"),
resolve(__dirname, "src/publication/encryption/index.ts"),
],
external: ["@readium/helpers"],
preserveEntrySignatures: "strict",
output: {
format: "es",
preserveModules: true,
preserveModulesRoot: resolve(__dirname, "src"),
dir: "dist",
entryFileNames: "[name].js",
}
}
},
define: {
"import.meta.env.PACKAGE_NAME": JSON.stringify(packageJson.name),
"import.meta.env.PACKAGE_VERSION": JSON.stringify(packageJson.version),
}
});