From 100b9ff56a9de6618b3445276cde6af77a587244 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 7 Oct 2023 11:42:41 +0000 Subject: [PATCH] chore(deps): update dependency rollup-plugin-serve to v2 --- package.json | 2 +- rollup.config.dev.js | 15 ++++++------ rollup.config.js | 54 ++++++++++++++++---------------------------- yarn.lock | 8 +++---- 4 files changed, 31 insertions(+), 48 deletions(-) diff --git a/package.json b/package.json index d2e9624c..66b4ab97 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "rollup-plugin-commonjs": "^10.1.0", "rollup-plugin-gzip": "^3.0.1", "rollup-plugin-node-resolve": "^5.2.0", - "rollup-plugin-serve": "^1.1.0", + "rollup-plugin-serve": "^2.0.0", "rollup-plugin-terser": "^7.0.2", "rollup-plugin-typescript2": "^0.36.0", "typescript": "*" diff --git a/rollup.config.dev.js b/rollup.config.dev.js index f79836d8..911a8edb 100644 --- a/rollup.config.dev.js +++ b/rollup.config.dev.js @@ -1,10 +1,10 @@ -import resolve from 'rollup-plugin-node-resolve'; -import typescript from 'rollup-plugin-typescript2'; -import babel from 'rollup-plugin-babel'; -import serve from 'rollup-plugin-serve'; -import { terser } from 'rollup-plugin-terser'; -import json from '@rollup/plugin-json'; -import image from '@rollup/plugin-image'; +import resolve from 'rollup-plugin-node-resolve' +import typescript from 'rollup-plugin-typescript2' +import babel from 'rollup-plugin-babel' +import serve from 'rollup-plugin-serve' +import { terser } from 'rollup-plugin-terser' +import json from '@rollup/plugin-json' +import image from '@rollup/plugin-image' export default { input: ['src/clock-weather-card.ts'], @@ -25,7 +25,6 @@ export default { contentBase: './dist', host: '0.0.0.0', port: 5001, - allowCrossOrigin: true, headers: { 'Access-Control-Allow-Origin': '*', }, diff --git a/rollup.config.js b/rollup.config.js index 2325212d..998dd59c 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,38 +1,11 @@ -import typescript from 'rollup-plugin-typescript2'; -import commonjs from 'rollup-plugin-commonjs'; -import nodeResolve from 'rollup-plugin-node-resolve'; -import babel from 'rollup-plugin-babel'; +import typescript from 'rollup-plugin-typescript2' +import commonjs from 'rollup-plugin-commonjs' +import nodeResolve from 'rollup-plugin-node-resolve' +import babel from 'rollup-plugin-babel' import { terser } from 'rollup-plugin-terser'; -import serve from 'rollup-plugin-serve'; -import json from '@rollup/plugin-json'; -import image from '@rollup/plugin-image'; -import gzipPlugin from 'rollup-plugin-gzip'; - -const dev = process.env.ROLLUP_WATCH; - -const serveopts = { - contentBase: ['./dist'], - host: '0.0.0.0', - port: 5000, - allowCrossOrigin: true, - headers: { - 'Access-Control-Allow-Origin': '*', - }, -}; - -const plugins = [ - image(), - nodeResolve({}), - commonjs(), - typescript(), - json(), - babel({ - exclude: 'node_modules/**', - }), - dev && serve(serveopts), - !dev && terser(), - gzipPlugin(), -]; +import json from '@rollup/plugin-json' +import image from '@rollup/plugin-image' +import gzipPlugin from 'rollup-plugin-gzip' export default [ { @@ -41,6 +14,17 @@ export default [ dir: 'dist', format: 'es', }, - plugins: [...plugins], + plugins: [ + image(), + nodeResolve({}), + commonjs(), + typescript(), + json(), + babel({ + exclude: 'node_modules/**', + }), + terser(), + gzipPlugin() + ] }, ]; diff --git a/yarn.lock b/yarn.lock index 7826db44..816d6660 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2362,10 +2362,10 @@ rollup-plugin-node-resolve@^5.2.0: resolve "^1.11.1" rollup-pluginutils "^2.8.1" -rollup-plugin-serve@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-serve/-/rollup-plugin-serve-1.1.0.tgz#0654a57021a21b903340c69940f7463706e8288d" - integrity sha512-pYkSsuA0/psKqhhictkJw1c2klya5b+LlCvipWqI9OE1aG2M97mRumZCbBlry5CMEOzYBBgSDgd1694sNbmyIw== +rollup-plugin-serve@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/rollup-plugin-serve/-/rollup-plugin-serve-2.0.2.tgz#f49958b0725c9bd2fef976d23025a361e20bdee2" + integrity sha512-ALqyTbPhlf7FZ5RzlbDvMYvbKuCHWginJkTo6dMsbgji/a78IbsXox+pC83HENdkTRz8OXrTj+aShp3+3ratpg== dependencies: mime ">=2.4.6" opener "1"