Skip to content

Commit

Permalink
fix: add bounces attr
Browse files Browse the repository at this point in the history
  • Loading branch information
MrpandaLiu committed Jul 26, 2023
1 parent 1147e74 commit 410944f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/big-turtles-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@ice/plugin-pha': patch
---

fix: add bounces attr
1 change: 1 addition & 0 deletions examples/with-pha/src/pages/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const pageConfig = definePageConfig(() => {
'source',
'disableNav',
],
bounces: true,
title: 'Home',
};
});
2 changes: 2 additions & 0 deletions packages/plugin-pha/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export const decamelizeKeys = [
'cacheQueryParams',
'customDataSource',
'enableExpiredManifest',
'bounces',
];

// Do not decamelize list.
Expand Down Expand Up @@ -81,6 +82,7 @@ export const validPageConfigKeys = [
'pullRefresh',
'queryParamsPassIgnoreKeys',
'downgradeUrl',
'bounces',
];

// The manifest configuration is the default value for the page configuration
Expand Down
2 changes: 2 additions & 0 deletions packages/plugin-pha/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ export type Manifest = Partial<{
routes: Page[];
enableExpiredManifest: boolean;
pullRefresh?: PullRefresh;
bounces: boolean;
}> & WindowConfig & Record<string, any>;

export type PHAManifest = Partial<{
Expand All @@ -213,4 +214,5 @@ export type PHAManifest = Partial<{
max_age: number;
package_resources: Record<string, string>;
resource_prefetch: ResourcePrefetch;
bounces: boolean;
}>;

0 comments on commit 410944f

Please sign in to comment.