From a9f4d0dff935fdae11fefb95418cb92400805b49 Mon Sep 17 00:00:00 2001 From: renovate Date: Mon, 26 Jul 2021 20:26:53 +0000 Subject: [PATCH] Update dependency vite-plugin-pwa to v0.8.2 (#612) Co-authored-by: kolaente Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/612 Co-authored-by: renovate Co-committed-by: renovate --- package.json | 9 ++-- rollup.sw.js | 43 ----------------- src/ServiceWorker/events.json | 3 -- src/components/home/update.vue | 4 +- src/registerServiceWorker.js | 3 +- src/{ServiceWorker => }/sw.js | 0 vite.config.js | 7 ++- yarn.lock | 84 ++++++++-------------------------- 8 files changed, 26 insertions(+), 127 deletions(-) delete mode 100644 rollup.sw.js delete mode 100644 src/ServiceWorker/events.json rename src/{ServiceWorker => }/sw.js (100%) diff --git a/package.json b/package.json index bf3896a4..080b4cd1 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "scripts": { "serve": "vite", "serve:dist-dev": "node scripts/serve-dist.js", - "build": "vite build && rollup -c ./rollup.sw.js && workbox copyLibraries dist/", + "serve:dist": "vite preview", + "build": "vite build && workbox copyLibraries dist/", "build:dev": "vite build -m development --outDir dist-dev/", "lint": "eslint --ignore-pattern '*.test.*' ./src --ext .vue,.js,.ts", "cypress:open": "cypress open", @@ -40,10 +41,6 @@ "@fortawesome/free-regular-svg-icons": "5.15.3", "@fortawesome/free-solid-svg-icons": "5.15.3", "@fortawesome/vue-fontawesome": "2.0.2", - "@rollup/plugin-babel": "5.3.0", - "@rollup/plugin-commonjs": "19.0.2", - "@rollup/plugin-node-resolve": "13.0.4", - "@rollup/plugin-replace": "3.0.0", "@types/jest": "26.0.24", "@typescript-eslint/eslint-plugin": "4.28.5", "@typescript-eslint/parser": "4.28.5", @@ -66,7 +63,7 @@ "ts-jest": "27.0.4", "typescript": "4.3.5", "vite": "2.4.3", - "vite-plugin-pwa": "0.5.6", + "vite-plugin-pwa": "0.8.2", "vite-plugin-vue2": "1.7.3", "vue-flatpickr-component": "8.1.7", "vue-notification": "1.3.20", diff --git a/rollup.sw.js b/rollup.sw.js deleted file mode 100644 index 828d9872..00000000 --- a/rollup.sw.js +++ /dev/null @@ -1,43 +0,0 @@ -import { nodeResolve } from '@rollup/plugin-node-resolve' -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import { terser } from 'rollup-plugin-terser' -import replace from '@rollup/plugin-replace' - -// Building the sw stuff ourselves to have more controle over it - see https://github.com/antfu/vite-plugin-pwa/issues/35#issuecomment-797942573 -export default { - input: './dist/sw.js', - output: { - dir: 'dist', - format: 'esm', - }, - plugins: [ - replace({ - 'process.env.NODE_ENV': JSON.stringify('production'), - 'preventAssignment': true, - }), - nodeResolve({ - browser: true, - }), - commonjs(), - babel({ - exclude: '**/node_modules/**', - extensions: ['js'], - babelHelpers: 'runtime', - presets: [ - [ - '@babel/preset-env', - { - corejs: 3, - useBuiltIns: 'entry', - targets: { - 'esmodules': true, - }, - modules: false, - }, - ], - ], - }), - terser(), - ], -} diff --git a/src/ServiceWorker/events.json b/src/ServiceWorker/events.json deleted file mode 100644 index 73ac1c51..00000000 --- a/src/ServiceWorker/events.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "SW_UPDATED": "swUpdated" -} \ No newline at end of file diff --git a/src/components/home/update.vue b/src/components/home/update.vue index 2569c9c3..1bbb9908 100644 --- a/src/components/home/update.vue +++ b/src/components/home/update.vue @@ -8,8 +8,6 @@