🐛 Support multiple Next.js versions in one file (#8339)

This commit is contained in:
Joe Haddad 2019-08-12 16:53:11 -04:00 committed by GitHub
parent 8d219c2371
commit df30f5e4b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -41,7 +41,7 @@ try {
// update file's data
file.data = Buffer.from(
result.outputText.replace(
/process\.env\.__NEXT_VERSION/,
/process\.env\.__NEXT_VERSION/g,
`"${require('./package.json').version}"`
),
'utf8'

View file

@ -41,7 +41,7 @@ module.exports = function (task) {
function setNextVersion (code) {
return code.replace(
/process\.env\.__NEXT_VERSION/,
/process\.env\.__NEXT_VERSION/g,
`"${require('./package.json').version}"`
)
}