-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support pwa in boilerplate template (#262)
* add pwa to next boilerplate template * support pwa in vite * Update templates/nextjs-boilerplate-template/src/app/layout.tsx Co-authored-by: Maayan <maayan@aptoslabs.com> * Update templates/nextjs-boilerplate-template/src/app/layout.tsx Co-authored-by: Maayan <maayan@aptoslabs.com> * Update next.config.mjs * remove webpack * update readme * add disable flag to pwa config * Update templates/nextjs-boilerplate-template/next.config.mjs --------- Co-authored-by: Maayan <maayan@aptoslabs.com>
- Loading branch information
Showing
16 changed files
with
110 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Aptos related files | ||
.aptos | ||
.env | ||
contract/build | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
build | ||
dist-ssr | ||
*.local | ||
package-lock.json | ||
pnpm-lock.yaml | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
# template related files | ||
example-collection/ | ||
|
||
.next |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
import withPWAInit from "@ducanh2912/next-pwa"; | ||
|
||
const withPWA = withPWAInit({ | ||
disable: false, | ||
}); | ||
|
||
// Your Next config is automatically typed! | ||
export default withPWA({ | ||
output: "export", // Outputs a Single-Page Application (SPA). | ||
distDir: "./dist", // Changes the build output directory to `./dist/`. | ||
basePath: process.env.NEXT_PUBLIC_BASE_PATH, // Sets the base path to `/some-base-path`. | ||
}; | ||
|
||
export default nextConfig; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
templates/nextjs-boilerplate-template/src/app/manifest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"name": "Aptos Fullstack Template", | ||
"short_name": "Aptos Template", | ||
"icons": [ | ||
{ | ||
"src": "/icons/icon-192x192.png", | ||
"sizes": "192x192", | ||
"type": "image/png", | ||
"purpose": "any maskable" | ||
}, | ||
{ | ||
"src": "/icons/icon-384x384.png", | ||
"sizes": "384x384", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "/icons/icon-512x512.png", | ||
"sizes": "512x512", | ||
"type": "image/png" | ||
} | ||
], | ||
"start_url": "/", | ||
"display": "standalone", | ||
"orientation": "portrait" | ||
} |