From 417689b725b2d1b53f9c26ebe949d0fc454dbd13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Gr=C3=B6ger?= Date: Wed, 14 Jun 2023 12:10:33 +0200 Subject: [PATCH] update dependencies for modify-source-webpack-plugin new operation function because of api-change --- package.json | 8 ++++---- quasar.conf.js | 23 +++++++++++------------ 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index a0e63da..b5c851c 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "@flaschengeist/pricelist-old": "^1.0.0-alpha.1", "@flaschengeist/schedule": "^1.0.0-alpha.8", "@flaschengeist/users": "^1.0.0-alpha.4", - "axios": "^0.24.0", + "axios": "^1.4.0", "pinia": "^2.0.8", "quasar": "^2.11.10", "vue": "^3.0.0", @@ -41,9 +41,9 @@ "eslint": "^8.5.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-prettier": "^4.0.0", - "eslint-plugin-vue": "^8.2.0", - "eslint-webpack-plugin": "^3.1.1", - "modify-source-webpack-plugin": "^3.0.0", + "eslint-plugin-vue": "^9.14.1", + "eslint-webpack-plugin": "^4.0.1", + "modify-source-webpack-plugin": "^4.1.0", "prettier": "^2.5.1", "typescript": "^4.5.4", "vuedraggable": "^4.1.0" diff --git a/quasar.conf.js b/quasar.conf.js index 00fab5e..7b475b3 100644 --- a/quasar.conf.js +++ b/quasar.conf.js @@ -9,10 +9,18 @@ /* eslint-env node */ /* eslint-disable @typescript-eslint/no-var-requires */ const ESLintPlugin = require('eslint-webpack-plugin'); -const { ModifySourcePlugin } = require('modify-source-webpack-plugin'); +const { ModifySourcePlugin, ReplaceOperation } = require('modify-source-webpack-plugin'); const { configure } = require('quasar/wrappers'); -module.exports = configure(function (/* ctx */) { +const operation = () => { + const custom_plgns = require('./plugin.config.js'); + const required_plgns = require('./src/vendor-plugin.config.js'); + const plugins = [...custom_plgns, ...required_plgns].map((v) => `import("${v}").catch(() => "${v}")`); + const replace = new ReplaceOperation('all', `\\/\\* *INSERT_PLUGIN_LIST *\\*\\/`, `${plugins.join(', ')}`); + return replace; +}; + +module.exports = configure(function(/* ctx */) { return { // https://quasar.dev/quasar-cli/supporting-ts supportTS: { @@ -81,16 +89,7 @@ module.exports = configure(function (/* ctx */) { rules: [ { test: /plugins\.ts$/, - modify: (src, filename) => { - const custom_plgns = require('./plugin.config.js'); - const required_plgns = require('./src/vendor-plugin.config.js'); - return src.replace( - /\/\* *INSERT_PLUGIN_LIST *\*\//, - [...custom_plgns, ...required_plgns] - .map((v) => `import("${v}").catch(() => "${v}")`) - .join(',') - ); - }, + operations: [operation()], }, ], },