Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
fix replace bug
  • Loading branch information
xiaohuohumax committed Jan 18, 2023
1 parent 7a7e4f7 commit cb3a8a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build/plugins/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ export function setupFormat({}) {

let scriptTmp = fs.readFileSync(templatePath, 'utf-8')

scriptTmp = scriptTmp.replace('[{{code}}]', fs.readFileSync(scriptPath, 'utf-8'))
scriptTmp = scriptTmp.replace('[{{config}}]', loadConfig())
scriptTmp = scriptTmp.replace('[{{header}}]', loadHeader())
scriptTmp = scriptTmp.replace('[{{code}}]', () => fs.readFileSync(scriptPath, 'utf-8'))
scriptTmp = scriptTmp.replace('[{{config}}]', () => loadConfig())
scriptTmp = scriptTmp.replace('[{{header}}]', () => loadHeader())

fs.writeFileSync(scriptPath, scriptTmp)

Expand Down

0 comments on commit cb3a8a0

Please sign in to comment.