Skip to content

Commit

Permalink
fix: 修复vue-cli3.0项目端口被占用的bug #97
Browse files Browse the repository at this point in the history
  • Loading branch information
Kntt committed May 11, 2019
1 parent 3a4297a commit cd6e14a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/skeletonPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ function SkeletonPlugin(options = {}) {
}

SkeletonPlugin.prototype.createServer = function () { // eslint-disable-line func-names
const server = this.server = new Server(this.options) // eslint-disable-line no-multi-assign
server.listen().catch(err => server.log.warn(err))
if (!this.server) {
const server = this.server = new Server(this.options) // eslint-disable-line no-multi-assign
server.listen().catch(err => server.log.warn(err))
}
}

SkeletonPlugin.prototype.insertScriptToClient = function (htmlPluginData) { // eslint-disable-line func-names
Expand Down

1 comment on commit cd6e14a

@katoto
Copy link

@katoto katoto commented on cd6e14a Jun 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ojbk

Please sign in to comment.