Skip to content

Commit be54981

Browse files
authored
chore: web-extension vite.config.ts needs these changes to work for node 14 (#1146)
1 parent 3416c3a commit be54981

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/web-extension/vite.config.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ function useSpecialFormat(
2121
(config.build?.lib as LibraryOptions)?.entry,
2222
);
2323
if (shouldUse) {
24-
config.build ??= {};
24+
config.build = config.build ?? {};
2525
// @ts-expect-error: lib needs to be an object, forcing it.
26-
config.build.lib ||= {};
26+
config.build.lib =
27+
typeof config.build.lib == 'object' ? config.build.lib : {};
2728
// @ts-expect-error: lib is an object
2829
config.build.lib.formats = [format];
2930
}

0 commit comments

Comments
 (0)