From 531ec0a33dc5abe4bc50aa351c2bbbcb5a13f536 Mon Sep 17 00:00:00 2001 From: Mrpandaliu <2316371523@qq.com> Date: Wed, 26 Jul 2023 16:29:17 +0800 Subject: [PATCH] fix(plugin-pha): add attr --- .changeset/afraid-forks-cheer.md | 5 +++++ packages/plugin-pha/src/constants.ts | 2 ++ packages/plugin-pha/src/types.ts | 2 ++ 3 files changed, 9 insertions(+) create mode 100644 .changeset/afraid-forks-cheer.md diff --git a/.changeset/afraid-forks-cheer.md b/.changeset/afraid-forks-cheer.md new file mode 100644 index 0000000000..7ffcff89ea --- /dev/null +++ b/.changeset/afraid-forks-cheer.md @@ -0,0 +1,5 @@ +--- +'@ice/plugin-pha': patch +--- + +fix: add `bounces` attr diff --git a/packages/plugin-pha/src/constants.ts b/packages/plugin-pha/src/constants.ts index b1479d319a..7070e7d621 100644 --- a/packages/plugin-pha/src/constants.ts +++ b/packages/plugin-pha/src/constants.ts @@ -47,6 +47,7 @@ export const decamelizeKeys = [ 'cacheQueryParams', 'customDataSource', 'enableExpiredManifest', + 'bounces', ]; // Do not decamelize list. @@ -81,6 +82,7 @@ export const validPageConfigKeys = [ 'pullRefresh', 'queryParamsPassIgnoreKeys', 'downgradeUrl', + 'bounces', ]; // The manifest configuration is the default value for the page configuration diff --git a/packages/plugin-pha/src/types.ts b/packages/plugin-pha/src/types.ts index e82a999f44..9b3309b4b7 100644 --- a/packages/plugin-pha/src/types.ts +++ b/packages/plugin-pha/src/types.ts @@ -191,6 +191,7 @@ export type Manifest = Partial<{ routes: Page[]; enableExpiredManifest: boolean; pullRefresh?: PullRefresh; + bounces: boolean; }> & WindowConfig & Record; export type PHAManifest = Partial<{ @@ -213,4 +214,5 @@ export type PHAManifest = Partial<{ max_age: number; package_resources: Record; resource_prefetch: ResourcePrefetch; + bounces: boolean; }>;