Skip to content

Commit

Permalink
[bug] fix isomorphic-assets.json write path (#1264)
Browse files Browse the repository at this point in the history
* fix isomorphic assets write path

* modify
  • Loading branch information
1846689910 authored and jchip committed May 31, 2019
1 parent dd07275 commit 2c266cf
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,11 @@ class Middleware {
}

if (isoConfig.assetsFile) {
const assetsFile = Path.resolve(isoConfig.assetsFile);
const assetsFile = Path.join(this.memFsCwd, isoConfig.assetsFile);
const source = fileSystem.readFileSync(assetsFile);
Fs.writeFileSync(assetsFile, source);
const dir = Path.resolve("./dist");
if (!Fs.existsSync(dir)) shell.mkdir("-p", dir);
Fs.writeFileSync(Path.join(dir, isoConfig.assetsFile), source);
}

process.nextTick(() => cb(true));
Expand Down

0 comments on commit 2c266cf

Please sign in to comment.