-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts.timestamp-1679932230379.mjs
44 lines (42 loc) · 3.82 KB
/
vite.config.ts.timestamp-1679932230379.mjs
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
43
44
// vite.config.ts
import { resolve } from "node:path";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import dts from "vite-plugin-dts";
import EsLint from "vite-plugin-linter";
import tsConfigPaths from "vite-tsconfig-paths";
// package.json
var peerDependencies = {
react: "16.8.0 || >=17.x",
"react-dom": "16.8.0 || >=17.x"
};
// vite.config.ts
var { EsLinter, linterPlugin } = EsLint;
var vite_config_default = defineConfig((configEnv) => ({
plugins: [
dts({
include: ["src/component/"]
}),
react(),
tsConfigPaths(),
linterPlugin({
include: ["./src}/**/*.{ts,tsx}"],
linters: [new EsLinter({ configEnv })]
})
],
build: {
lib: {
entry: resolve("src", "component/index.ts"),
name: "ReactViteLibrary",
formats: ["es", "umd"],
fileName: (format) => `react-vite-library.${format}.js`
},
rollupOptions: {
external: [...Object.keys(peerDependencies)]
}
}
}));
export {
vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCIvVXNlcnMvbGF3cmVuY2Vpa3BlYmUvRG9jdW1lbnRzL3dvcmsvcHJvamVjdHMvY3VzdG9tX2xpYi9yZWFjdC12aXRlLWxpYnJhcnlcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZmlsZW5hbWUgPSBcIi9Vc2Vycy9sYXdyZW5jZWlrcGViZS9Eb2N1bWVudHMvd29yay9wcm9qZWN0cy9jdXN0b21fbGliL3JlYWN0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