Skip to content

Commit fdfdbd3

Browse files
huixishengGcaufy
authored andcommitted
fix(cli): output-file can't replace content
fix #2007
1 parent c6bacd8 commit fdfdbd3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/cli/core/compile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ class Compile extends Hook {
367367

368368
this.hookAsyncSeq('output-file', { filename, code }).then(({ filename, code }) => {
369369
logger.silly('output', 'write file: ' + filename);
370-
fs.outputFile(filename, sfc[k].outputCode, function (err) {
370+
fs.outputFile(filename, code, function (err) {
371371
if (err) {
372372
console.log(err);
373373
}

0 commit comments

Comments
 (0)