Skip to content

Commit

Permalink
chore: web-extension vite.config.ts needs these changes to work for n…
Browse files Browse the repository at this point in the history
…ode 14 (#1146)
  • Loading branch information
neilhan authored Feb 19, 2023
1 parent 3416c3a commit be54981
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/web-extension/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ function useSpecialFormat(
(config.build?.lib as LibraryOptions)?.entry,
);
if (shouldUse) {
config.build ??= {};
config.build = config.build ?? {};
// @ts-expect-error: lib needs to be an object, forcing it.
config.build.lib ||= {};
config.build.lib =
typeof config.build.lib == 'object' ? config.build.lib : {};
// @ts-expect-error: lib is an object
config.build.lib.formats = [format];
}
Expand Down

0 comments on commit be54981

Please sign in to comment.