diff --git a/packages/vue-cli-plugin-uni/commands/serve.js b/packages/vue-cli-plugin-uni/commands/serve.js index 75f5c5f05d5e986c8ab0c5951fc6b5282c94d971..2c980a8f31a3b99421130ab1273f514ecffe1104 100644 --- a/packages/vue-cli-plugin-uni/commands/serve.js +++ b/packages/vue-cli-plugin-uni/commands/serve.js @@ -101,7 +101,7 @@ module.exports = (api, options) => { // inject dev & hot-reload middleware entries if (!isProduction) { const sockjsUrl = publicUrl - // explicitly configured via devServer.public + // explicitly configured via devServer.public ? `?${publicUrl}/sockjs-node` : isInContainer // can't infer public netowrk url if inside a container... @@ -163,7 +163,7 @@ module.exports = (api, options) => { // this works with vue-devtools & @vue/cli-overlay app.use('/__open-in-editor', launchEditorMiddleware(() => console.log( `To specify an editor, sepcify the EDITOR env variable or ` + - `add "editor" field to your Vue project config.\n` + `add "editor" field to your Vue project config.\n` ))) // allow other plugins to register middlewares, e.g. PWA api.service.devServerConfigFns.forEach(fn => fn(app, server)) @@ -173,7 +173,7 @@ module.exports = (api, options) => { } })) - ; + ; ['SIGINT', 'SIGTERM'].forEach(signal => { process.on(signal, () => { server.close(() => { @@ -249,9 +249,11 @@ module.exports = (api, options) => { if (isFirstCompile) { isFirstCompile = false - if (!isProduction) { - if (process.UNI_CLOUD) { - console.warn(`当前项目使用了uniCloud,为避免云函数调用跨域问题,建议在HBuilderX内置浏览器里调试,如使用外部浏览器需处理跨域,详见:https://uniapp.dcloud.io/uniCloud/quickstart?id=useinh5`) + if (!isProduction) { + if (process.UNI_CLOUD) { + console.warn( + `当前项目使用了uniCloud,为避免云函数调用跨域问题,建议在HBuilderX内置浏览器里调试,如使用外部浏览器需处理跨域,详见:https://uniapp.dcloud.io/uniCloud/quickstart?id=useinh5` + ) } // const buildCommand = hasProjectYarn(api.getCwd()) ? `yarn build` : `npm run build` // console.log(` Note that the development build is not optimized.`) @@ -292,6 +294,10 @@ module.exports = (api, options) => { } }) + if (server.showStatus) { + server.showStatus = function () {} + } + server.listen(port, host, err => { if (err) { reject(err) diff --git a/packages/webpack-uni-pages-loader/lib/platforms/mp-alipay.js b/packages/webpack-uni-pages-loader/lib/platforms/mp-alipay.js index 6420b9dbe7743280c0ff93d0852d32ebca481429..a0872822dc0d82dd5691868198895259e35f3b0c 100644 --- a/packages/webpack-uni-pages-loader/lib/platforms/mp-alipay.js +++ b/packages/webpack-uni-pages-loader/lib/platforms/mp-alipay.js @@ -63,12 +63,12 @@ module.exports = function (pagesJson, manifestJson) { }) copyToJson(app, pagesJson, pagesJson2AppJson) - + const platformJson = manifestJson['mp-alipay'] || {} if (hasOwn(platformJson, 'plugins')) { app.plugins = platformJson.plugins } - + if (app.usingComponents) { updateAppJsonUsingComponents(app.usingComponents) }