Skip to content

Commit

Permalink
support turbo, remove next-pwa for now
Browse files Browse the repository at this point in the history
  • Loading branch information
arzafran committed Jul 11, 2023
1 parent 080cc7f commit 55ef6d9
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 50 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/node_modules
/.pnp
.pnp.js
.turbo

# testing
/coverage
Expand Down
27 changes: 13 additions & 14 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
const withPWA = require('@ducanh2912/next-pwa').default({
dest: 'public',
register: true,
skipWaiting: true,
disable: process.env.NODE_ENV === 'development',
buildExcludes: [/middleware-manifest.json$/],
maximumFileSizeToCacheInBytes: 4000000,
workboxOptions: {
mode: 'production',
},
})
// const { DuplicatesPlugin } = require('inspectpack/plugin')
const DuplicatePackageCheckerPlugin = require('@cerner/duplicate-package-checker-webpack-plugin')
// const withPWA = require('@ducanh2912/next-pwa').default({
// dest: 'public',
// register: true,
// skipWaiting: true,
// disable: process.env.NODE_ENV === 'development',
// buildExcludes: [/middleware-manifest.json$/],
// maximumFileSizeToCacheInBytes: 4000000,
// workboxOptions: {
// mode: 'production',
// },
// })

const DuplicatePackageCheckerPlugin = require('@cerner/duplicate-package-checker-webpack-plugin')
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
})
Expand Down Expand Up @@ -189,7 +188,7 @@ const nextConfig = {
}

module.exports = () => {
const plugins = [withPWA, withBundleAnalyzer]
const plugins = [withBundleAnalyzer]
return plugins.reduce((acc, plugin) => plugin(acc), {
...nextConfig,
})
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"size": "npm run build && size-limit"
},
"dependencies": {
"@ducanh2912/next-pwa": "^9.1.4",
"@ducanh2912/next-pwa": "^9.2.0",
"@studio-freight/compono": "^0.0.21",
"@studio-freight/hamo": "^0.6.19",
"@studio-freight/react-lenis": "^0.0.23",
Expand Down
41 changes: 6 additions & 35 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://turbo.build/schema.json",
"pipeline": {
"build": {
"outputs": [".next/**", "!.next/cache/**"]
},
"lint": {}
}
}

1 comment on commit 55ef6d9

@github-actions
Copy link

Choose a reason for hiding this comment

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

"⚡️ Lighthouse report for the changes in this commit:

🟠 Performance: 68
🟢 Accessibility: 97
🟢 Best practices: 100
🟠 SEO: 83
🟢 PWA: 90

Lighthouse ran on https://satus-jlcq9sog6-studio-freight.vercel.app/"

Please sign in to comment.