Skip to content

Commit a6ceb8d

Browse files
committed
feat: allow installing core plugins from next dist-tag
1 parent dd4fb2e commit a6ceb8d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/@vue/cli/lib/Creator.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,13 @@ module.exports = class Creator extends EventEmitter {
108108
this.emit('creation', { event: 'creating' })
109109

110110
// get latest CLI version
111-
const { latest } = await getVersions()
112-
const latestMinor = `${semver.major(latest)}.${semver.minor(latest)}.0`
111+
const { current, latest } = await getVersions()
112+
let latestMinor = `${semver.major(latest)}.${semver.minor(latest)}.0`
113+
114+
// if using `next` branch of cli
115+
if (semver.gt(current, latest) && semver.prerelease(current)) {
116+
latestMinor = current
117+
}
113118
// generate package.json with plugin dependencies
114119
const pkg = {
115120
name,

0 commit comments

Comments
 (0)