-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
39 lines (37 loc) · 981 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
import { defineConfig } from 'vite';
import webExtension, { readJsonFile } from 'vite-plugin-web-extension';
import { viteStaticCopy } from 'vite-plugin-static-copy';
import solidPlugin from 'vite-plugin-solid';
function generateManifest() {
const manifest = readJsonFile('src/manifest.json');
const pkg = readJsonFile('package.json');
return {
name: pkg.name,
description: pkg.description,
version: pkg.version,
...manifest,
};
}
export default defineConfig({
plugins: [
webExtension({
manifest: generateManifest,
watchFilePaths: ['package.json', 'manifest.json'],
webExtConfig: {
startUrl: 'https://sentry.io',
},
disableAutoLaunch: true,
additionalInputs: ['src/index.html', 'src/index.tsx', 'src/app.css', 'src/content-script.ts', 'src/web-accessible-script.ts'],
}),
solidPlugin(),
viteStaticCopy({
structured: true,
targets: [
{
src: 'src/web-accessible-script/bundles/',
dest: '/',
},
],
}),
],
});