write to bundle if first time
This commit is contained in:
parent
f4e88a6879
commit
0edc374729
1 changed files with 2 additions and 1 deletions
|
|
@ -110,7 +110,8 @@ function run(input, output) {
|
|||
.replace(versionTag, isFile(packageFile) ? parse(packageFile).version : versionTag) // set version
|
||||
|
||||
code = "new function() {\n" + code + "\n}"
|
||||
if (code !== read(output)) fs.writeFileSync(output, code, "utf8")
|
||||
|
||||
if (!isFile(output) || code !== read(output)) fs.writeFileSync(output, code, "utf8")
|
||||
}
|
||||
catch (e) {
|
||||
console.error(e.message)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue