Giter Site home page Giter Site logo

imbios / next-pwa Goto Github PK

View Code? Open in Web Editor NEW
147.0 3.0 5.0 2.03 MB

Zero config PWA plugin for Next.js, with workbox 🧰 with appDir support

Home Page: https://next-pwa.imam.dev

License: MIT License

JavaScript 99.59% Shell 0.41%
web website cache lighthouse nextjs offline-first pwa service-worker webapp workbox

next-pwa's People

Contributors

filipchalupa avatar imbios avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

next-pwa's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/build-examples.yml
  • actions/checkout v3
  • pnpm/action-setup v2
  • actions/setup-node v3
.github/workflows/npm-publish.yml
  • actions/checkout v3
  • pnpm/action-setup v2
  • actions/setup-node v3
  • changesets/action v1
nodenv
.node-version
  • node 18
npm
docs/package.json
  • next 13.4.13
  • nextra 2.10.0
  • nextra-theme-docs 2.10.0
  • react 18.2.0
  • react-dom 18.2.0
  • @types/node 18.17.4
  • typescript 4.9.5
package.json
  • @changesets/changelog-github 0.4.8
  • @changesets/cli 2.26.2
  • @commitlint/cli 17.6.7
  • @commitlint/config-conventional 17.6.7
  • concurrently 8.2.0
  • dotenv-cli 7.2.1
  • eslint 8.46.0
  • husky 8.0.3
  • lint-staged 13.2.3
  • prettier 2.8.8
  • syncpack 9.8.6
  • turbo 1.10.12
  • pnpm 8
  • node >=16.0.0
  • pnpm 8.6.12
packages/config-prettier/package.json
packages/eslint-config-custom/package.json
  • eslint-config-next 13.4.13
  • eslint-config-prettier 8.10.0
  • eslint-config-turbo 1.10.12
packages/next-pwa/package.json
  • babel-loader 8.3.0
  • clean-webpack-plugin 4.0.0
  • globby 11.1.0
  • terser-webpack-plugin 5.3.9
  • workbox-webpack-plugin 6.6.1
  • workbox-window 6.6.1
  • webpack 5.88.2
  • next >=9.0.0
  • @typescript-eslint/eslint-plugin 5.62.0

  • Check this box to trigger a request for Renovate to run again on this repository

[BUG]:Uncaught (in promise) bad-precaching-response in production

Description of the bug

I am following this tutorial https://next-pwa.imam.dev/usage,
all works fine until I send it to production, then I get this error, any suggestion on how to fix it?

Screenshot 2023-07-25 at 15 44 06

Environment

N/A

Steps To Reproduce

N/A

Additional Information

No response

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

[FEAT]: black list api endpoints

Clear and concise description of the problem

We're seeing a lot of double requests on ios lately. Its like the service worker will do a prior request before the "real" request. This invalidates our oauth token which then results in a failed login.

Is there anyway of "black listing" /api/ and telling the sw never to call anything in that space?

{ip} - - [07/Jun/2023:06:38:34 +0200] "GET /api/broker/callback?code={long hash}-1&scope=openid%20mitid&state=login&iss=https%3A%2F%2F{oauth provider}.dk%2Fop HTTP/2.0" 302 0 "https://www.{domain}.dk/sw.js" "Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5 Mobile/15E148 Safari/604.1" "-" [RequestTime: 0.047 - UpstreamTime: 0.048]
{ip} - - [07/Jun/2023:06:38:34 +0200] "GET /api/broker/callback?code={long hash}-1&scope=openid%20mitid&state=login&iss=https%3A%2F%2F{oauth provider}.dk%2Fop HTTP/2.0" 499 0 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5 Mobile/15E148 Safari/604.1" "-" [RequestTime: 0.116 - UpstreamTime: -]

Suggested solution

No response

Alternative

No response

Additional context

No response

Validations

[FEAT]: Add Testing

Clear and concise description of the problem

We currently using build and manual test checking by humans who develop the code. It will be a bunch of work if we need to iterate faster.

Suggested solution

No response

Alternative

No response

Additional context

No response

Validations

[FEAT]: Migrate to TypeScript for Better Type-safety

Clear and concise description of the problem

Currently, we use JavaScript and TS partially in the examples. We can add better type-safety by using TypeScript for the main package.

Suggested solution

No response

Alternative

No response

Additional context

No response

Validations

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.