更新依赖

pull/930/merge
lyswhut 2022-01-14 11:19:26 +08:00
parent 79d418d1a1
commit f9cce82a93
8 changed files with 695 additions and 1138 deletions

View File

@ -2,9 +2,8 @@ module.exports = {
upgrade: true,
// target: 'newest',
reject: [
'webpack-dev-server',
'electron',
'electron-builder',
'chalk',
// 'eslint-config-standard'
]
}

View File

@ -147,6 +147,7 @@ module.exports = {
}),
new ESLintPlugin({
extensions: ['js', 'vue'],
formatter: require('eslint-formatter-friendly'),
}),
],
}

View File

@ -9,7 +9,6 @@ module.exports = merge(baseConfig, {
mode: 'development',
devtool: 'eval-source-map',
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"development"',

View File

@ -147,6 +147,7 @@ module.exports = {
}),
new ESLintPlugin({
extensions: ['js', 'vue'],
formatter: require('eslint-formatter-friendly'),
}),
],
}

View File

@ -9,7 +9,6 @@ module.exports = merge(baseConfig, {
mode: 'development',
devtool: 'eval-source-map',
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"development"',

View File

@ -43,27 +43,26 @@ function startRenderer() {
// // logStats('Renderer', stats)
// })
const server = new WebpackDevServer(
compiler,
{
contentBase: path.join(__dirname, '../'),
quiet: true,
hot: true,
historyApiFallback: true,
clientLogLevel: 'warning',
overlay: {
errors: true,
},
before(app, ctx) {
app.use(hotMiddlewareRenderer)
ctx.middleware.waitUntilValid(() => {
resolve()
})
},
const server = new WebpackDevServer({
port: 9080,
hot: true,
historyApiFallback: true,
// static: {
// directory: path.join(__dirname, '../'),
// },
client: {
logging: 'warn',
overlay: true,
},
)
setupMiddlewares(middlewares, devServer) {
devServer.app.use(hotMiddlewareRenderer)
devServer.middleware.waitUntilValid(resolve)
server.listen(9080)
return middlewares
},
}, compiler)
server.start()
})
}
@ -90,27 +89,25 @@ function startRendererLyric() {
// // logStats('Renderer', stats)
// })
const server = new WebpackDevServer(
compiler,
{
contentBase: path.join(__dirname, '../'),
quiet: true,
hot: true,
historyApiFallback: true,
clientLogLevel: 'warning',
overlay: {
errors: true,
},
before(app, ctx) {
app.use(hotMiddlewareRendererLyric)
ctx.middleware.waitUntilValid(() => {
resolve()
})
},
const server = new WebpackDevServer({
port: 9081,
hot: true,
historyApiFallback: true,
// static: {
// directory: path.join(__dirname, '../'),
// },
client: {
logging: 'warn',
overlay: true,
},
)
setupMiddlewares(middlewares, devServer) {
devServer.app.use(hotMiddlewareRenderer)
devServer.middleware.waitUntilValid(resolve)
return middlewares
},
}, compiler)
server.listen(9081)
server.start()
})
}
@ -202,8 +199,14 @@ function init() {
}
Promise.all([
startRenderer().then(() => handleSuccess('renderer')).catch(() => handleFail('renderer')),
startRendererLyric().then(() => handleSuccess('renderer-lyric')).catch(() => handleFail('renderer-lyric')),
startRenderer().then(() => handleSuccess('renderer')).catch((err) => {
console.error(err.message)
return handleFail('renderer')
}),
startRendererLyric().then(() => handleSuccess('renderer-lyric')).catch((err) => {
console.error(err.message)
return handleFail('renderer-lyric')
}),
startMain().then(() => handleSuccess('main')).catch(() => handleFail('main')),
]).then(startElectron).catch(err => {
console.error(err)

1731
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -197,7 +197,7 @@
"electron-builder": "^22.11.7",
"electron-debug": "^3.2.0",
"electron-devtools-installer": "^3.2.0",
"electron-to-chromium": "^1.4.43",
"electron-to-chromium": "^1.4.45",
"eslint": "^8.6.0",
"eslint-config-standard": "^16.0.3",
"eslint-formatter-friendly": "^7.0.0",
@ -206,14 +206,14 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-standard": "^4.1.0",
"eslint-plugin-vue": "^8.2.0",
"eslint-plugin-vue": "^8.3.0",
"eslint-webpack-plugin": "^3.1.1",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.5.0",
"less": "^4.1.2",
"less-loader": "^10.2.0",
"markdown-it": "^12.3.2",
"mini-css-extract-plugin": "^2.4.6",
"mini-css-extract-plugin": "^2.4.7",
"node-loader": "^2.0.0",
"postcss": "^8.4.5",
"postcss-loader": "^6.2.1",
@ -231,10 +231,10 @@
"url-loader": "^4.1.1",
"vue-loader": "^17.0.0",
"vue-template-compiler": "^2.6.14",
"webpack": "^5.65.0",
"webpack": "^5.66.0",
"webpack-cli": "^4.9.1",
"webpack-dev-server": "^3.11.2",
"webpack-hot-middleware": "^2.25.1",
"webpack-dev-server": "^4.7.3",
"webpack-hot-middleware": "github:lyswhut/webpack-hot-middleware#2cdfe0d0111dab6432b8683112fd2d17a5e80572",
"webpack-merge": "^5.8.0"
},
"dependencies": {