We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b8e7c10 + 2edbb0f commit 43abd64Copy full SHA for 43abd64
vite.config.ts
@@ -1,28 +1,14 @@
1
import { resolve } from "node:path";
2
-import { type LibraryFormats, defineConfig } from "vite";
3
-
4
-const formats = ["es", "cjs", "umd"] satisfies LibraryFormats[];
+import { defineConfig } from "vite";
5
6
export default defineConfig({
7
build: {
8
emptyOutDir: false,
9
outDir: "out",
10
lib: {
11
- formats,
+ formats: ["es"],
12
entry: resolve(__dirname, "src/index.ts"),
13
- name: "ScrapboxParser",
14
- fileName: (format) => {
15
- switch (format) {
16
- case "cjs":
17
- return "index.cjs";
18
- case "es":
19
- return "index.mjs";
20
- case "umd":
21
- return "scrapbox-parser.umd.js";
22
- default:
23
- throw new Error(`unknown format: ${format}`);
24
- }
25
- },
+ fileName: "index",
26
},
27
28
});
0 commit comments