mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 23:52:06 +00:00
fix(cli): publish nuxt and nuxt-edge in nuxt-edge (#4341)
This commit is contained in:
parent
3abc9e815e
commit
cca799cc6f
@ -95,8 +95,10 @@ export default class Package extends EventEmitter {
|
||||
suffixAndVersion() {
|
||||
this.logger.info(`Adding suffix ${this.options.suffix}`)
|
||||
|
||||
const oldPkgName = this.pkg.name
|
||||
|
||||
// Add suffix to the package name
|
||||
if (!this.pkg.name.includes(this.options.suffix)) {
|
||||
if (!oldPkgName.includes(this.options.suffix)) {
|
||||
this.pkg.name += this.options.suffix
|
||||
}
|
||||
|
||||
@ -111,6 +113,14 @@ export default class Package extends EventEmitter {
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof this.pkg.bin === 'string') {
|
||||
const bin = this.pkg.bin
|
||||
this.pkg.bin = {
|
||||
[oldPkgName]: bin,
|
||||
[this.pkg.name]: bin
|
||||
}
|
||||
}
|
||||
|
||||
this.generateVersion()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user