Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
chore: web-extension vite.config.ts needs these changes to work for n…
…ode 14
  • Loading branch information
neilhan committed Feb 18, 2023
commit 0f2bb0f4d761e57522f6fd791ebe71f6aa865577
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