diff options
author | Kristóf Marussy <kristof@marussy.com> | 2021-12-24 01:36:20 +0100 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2021-12-24 01:36:20 +0100 |
commit | cf3ec7fc396125ed452c553b34ae2737329fc61d (patch) | |
tree | 6d2fdbb40b9c9b1d32168d1ccb2372b5602f1968 /packages/service-preload/vite.config.js | |
parent | feat: Set up partition persistence (diff) | |
download | sophie-cf3ec7fc396125ed452c553b34ae2737329fc61d.tar.gz sophie-cf3ec7fc396125ed452c553b34ae2737329fc61d.tar.zst sophie-cf3ec7fc396125ed452c553b34ae2737329fc61d.zip |
feat: Service to main process communication
Diffstat (limited to 'packages/service-preload/vite.config.js')
-rw-r--r-- | packages/service-preload/vite.config.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/packages/service-preload/vite.config.js b/packages/service-preload/vite.config.js new file mode 100644 index 0000000..5af78d9 --- /dev/null +++ b/packages/service-preload/vite.config.js | |||
@@ -0,0 +1,31 @@ | |||
1 | // @ts-check | ||
2 | |||
3 | import { builtinModules } from 'module'; | ||
4 | |||
5 | import { chrome, makeConfig } from '../../config/vite-common'; | ||
6 | |||
7 | /** @type string */ | ||
8 | const PACKAGE_ROOT = __dirname; | ||
9 | |||
10 | /** | ||
11 | * @type {import('vite').UserConfig} | ||
12 | * @see https://vitejs.dev/config/ | ||
13 | */ | ||
14 | const config = makeConfig({ | ||
15 | root: PACKAGE_ROOT, | ||
16 | build: { | ||
17 | target: chrome, | ||
18 | lib: { | ||
19 | entry: 'src/index.ts', | ||
20 | formats: ['cjs'], | ||
21 | }, | ||
22 | rollupOptions: { | ||
23 | external: [ | ||
24 | 'electron', | ||
25 | ...builtinModules, | ||
26 | ], | ||
27 | }, | ||
28 | }, | ||
29 | }); | ||
30 | |||
31 | export default config; | ||