-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvite.config.ts
More file actions
33 lines (31 loc) · 912 Bytes
/
vite.config.ts
File metadata and controls
33 lines (31 loc) · 912 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
31
32
33
import { svelte } from "@sveltejs/vite-plugin-svelte";
import { resolve } from "path";
import { defineConfig } from "vite";
const srcDir = resolve(__dirname, "src");
const pagesDir = resolve(srcDir, "pages");
// https://vitejs.dev/config/
export default defineConfig({
plugins: [svelte()],
resolve: {
alias: {
src: srcDir,
},
},
build: {
rollupOptions: {
input: {
background: resolve(pagesDir, "background", "index.ts"),
content: resolve(pagesDir, "content", "index.ts"),
options: resolve(pagesDir, "options", "index.html"),
popup: resolve(pagesDir, "popup", "index.html"),
welcome: resolve(pagesDir, "welcome", "index.html"),
},
output: {
entryFileNames: (chunk) => `src/pages/${chunk.name}/index.js`,
},
},
},
optimizeDeps: {
include: ["lodash.get", "lodash.isequal", "lodash.clonedeep"],
},
});