chore: web-extension vite.config.ts needs these changes to work for node 14 (#1146)
This commit is contained in:
@@ -21,9 +21,10 @@ function useSpecialFormat(
|
|||||||
(config.build?.lib as LibraryOptions)?.entry,
|
(config.build?.lib as LibraryOptions)?.entry,
|
||||||
);
|
);
|
||||||
if (shouldUse) {
|
if (shouldUse) {
|
||||||
config.build ??= {};
|
config.build = config.build ?? {};
|
||||||
// @ts-expect-error: lib needs to be an object, forcing it.
|
// @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
|
// @ts-expect-error: lib is an object
|
||||||
config.build.lib.formats = [format];
|
config.build.lib.formats = [format];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user