upgrade `vue-cli-plugin-electron-builder`

pull/396/head
starknt 2024-11-18 11:05:43 +08:00
parent 609c9c782d
commit 7a7b384dd7
4 changed files with 7 additions and 9 deletions

View File

@ -8,7 +8,6 @@
},
"license": "MPL-2.0",
"homepage": "https://github.com/docmirror/dev-sidecar",
"main": "background.js",
"scripts": {
"serve": "vue-cli-service serve",
"lint": "vue-cli-service lint",
@ -49,7 +48,7 @@
"electron-builder": "^25.0.6",
"electron-icon-builder": "^2.0.1",
"json5-loader": "^4.0.1",
"vue-cli-plugin-electron-builder": "^2.1.1"
"vue-cli-plugin-electron-builder": "^3.0.0-alpha.4"
},
"browserslist": [
"> 1%",

View File

@ -1,14 +1,12 @@
const path = require('path')
const webpack = require('webpack')
const { defineConfig } = require('@vue/cli-service')
const publishUrl = process.env.VUE_APP_PUBLISH_URL
const publishProvider = process.env.VUE_APP_PUBLISH_PROVIDER
console.log('Publish url:', publishUrl)
/**
* @type {import('@vue/cli-service').ProjectOptions}
*/
module.exports = {
module.exports = defineConfig({
pages: {
index: {
entry: 'src/main.js',
@ -35,6 +33,7 @@ module.exports = {
},
pluginOptions: {
electronBuilder: {
mainProcessFile: "./src/background.js",
// Ref: https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/1891
customFileProtocol: './',
externals: [
@ -116,4 +115,4 @@ module.exports = {
},
},
},
}
})

View File

@ -1,4 +1,4 @@
const LRUCache = require('lru-cache').default
const LRUCache = require('lru-cache')
const log = require('../../utils/util.log')
const cacheSize = 1024

View File

@ -1,4 +1,4 @@
const LRUCache = require('lru-cache').default
const LRUCache = require('lru-cache')
const log = require('../../utils/util.log')
const { DynamicChoice } = require('../choice/index')