Skip to content

Commit

Permalink
Merge pull request #2897 from amitsingh-007/f-remove-pwa
Browse files Browse the repository at this point in the history
  • Loading branch information
amitsingh-007 authored Feb 4, 2024
2 parents 94ed5dd + fe82d96 commit 7bb5c35
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 587 deletions.
3 changes: 0 additions & 3 deletions apps/web/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
.next/
tsconfig.tsbuildinfo

# next-pwa
public/sw*
public/workbox*

.vercel

Expand Down
12 changes: 1 addition & 11 deletions apps/web/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
import ESLintPlugin from 'eslint-webpack-plugin';
import nextPWA from 'next-pwa';

import('./src/constants/env/server.mjs');

Expand Down Expand Up @@ -48,13 +47,4 @@ const nextConfig = {
},
};

/**
* Automatically generates a SW file with fetch listener, basic caching, etc.
* No need to create our own sw.js file. All default options work fine.
*/
const withPWA = nextPWA({
disable: isDev,
dest: 'public',
});

export default withPWA(nextConfig);
export default nextConfig;
1 change: 0 additions & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
"eslint-plugin-prettier": "5.1.3",
"eslint-webpack-plugin": "4.0.1",
"fork-ts-checker-webpack-plugin": "9.0.2",
"next-pwa": "5.6.0",
"node-fetch": "3.3.2",
"postcss": "8.4.33",
"postcss-preset-mantine": "1.12.3",
Expand Down
10 changes: 0 additions & 10 deletions apps/web/tests/specs/download-page.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,6 @@ test.describe('Download page', () => {
expect(download.suggestedFilename()).toMatch(/bypass-links-.+.zip/);
});

test('offline mode', async ({ page }, testConfig) => {
testConfig.setTimeout(30 * 1000);
await page.waitForTimeout(15 * 1000); // Let the SW cache assets
const context = page.context();
await context.setOffline(true);
await page.reload();
const downloadPage = new DownloadPage(page);
await downloadPage.testPageMetaData();
});

test('footer elements should exist', async ({ page }) => {
expect(page.getByTestId('ext-version')).toBeVisible();
expect(page.getByTestId('ext-release-data')).toBeVisible();
Expand Down
Loading

1 comment on commit 7bb5c35

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for bypass-links ready!

✅ Preview
https://bypass-links-u66sgx2z4-amitsingh-007.vercel.app

Built with commit 7bb5c35.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.