Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
totop716 committed Dec 3, 2021
2 parents 1b72073 + 7ed8ccb commit 86f25c1
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 115 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"rules": {
"@typescript-eslint/explicit-function-return-type": "off",
"prettier/prettier": "error",
"@typescript-eslint/no-explicit-any": "off"
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/explicit-module-boundary-types": "off"
}
}
48 changes: 0 additions & 48 deletions .github/workflows/lint.yml

This file was deleted.

65 changes: 0 additions & 65 deletions .github/workflows/tests.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"scripts": {
"analyze": "source-map-explorer 'build/static/js/*.js'",
"start": "react-app-rewired start",
"build": "react-app-rewired --max_old_space_size=4096 build",
"build": "CI=false react-app-rewired --max_old_space_size=4096 build",
"test": "react-scripts test --env=jsdom",
"format": "prettier --write \"**/*.{ts,js,tsx,json,md}\"",
"eject": "react-scripts eject",
Expand Down
23 changes: 23 additions & 0 deletions workbox-inject-build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const { injectManifest } = require('workbox-build')

let workboxConfig = {
globDirectory: 'build',
globPatterns: [
'*.js',
'*.css',
'favicon.ico',
'index.html',
],
swSrc: 'src/service-worker.js',
swDest: 'build/service-worker.js',
// Custom size limit
maximumFileSizeToCacheInBytes: 9 * 1024 * 1024
}

injectManifest(workboxConfig)
.then(({
count,
size
}) => {
console.log(`Generated ${workboxConfig.swDest}, which will precache ${count} files, totaling ${size} bytes.`)
})

0 comments on commit 86f25c1

Please sign in to comment.