Skip to content

Commit b1775d0

Browse files
authored
fix(web-extension): Fix types in vite config (#108)
1 parent 1172d6f commit b1775d0

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

packages/web-extension/vite.config.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
import {
2-
defineConfig,
3-
LibraryFormats,
4-
LibraryOptions,
5-
PluginOption,
6-
} from 'vite';
1+
import { defineConfig, LibraryFormats, PluginOption } from 'vite';
72
import webExtension, { readJsonFile } from 'vite-plugin-web-extension';
83
import zip from 'vite-plugin-zip-pack';
94
import * as path from 'path';
@@ -17,9 +12,8 @@ function useSpecialFormat(
1712
return {
1813
name: 'use-special-format',
1914
config(config) {
20-
const shouldUse = entriesToUse.includes(
21-
(config.build?.lib as LibraryOptions)?.entry,
22-
);
15+
const shouldUse =
16+
config.build?.lib && entriesToUse.includes(config.build.lib.entry);
2317
if (shouldUse) {
2418
config.build = config.build ?? {};
2519
// @ts-expect-error: lib needs to be an object, forcing it.

0 commit comments

Comments
 (0)