🐛 Support multiple Next.js versions in one file (#8339)
This commit is contained in:
parent
8d219c2371
commit
df30f5e4b6
2 changed files with 2 additions and 2 deletions
|
@ -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'
|
||||
|
|
|
@ -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}"`
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue