Skip to content

Commit

Permalink
[bug] fix loadable-stats.json path in dev mode (#1259)
Browse files Browse the repository at this point in the history
  • Loading branch information
1846689910 authored and jchip committed May 29, 2019
1 parent c15be2e commit 8de7ff7
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,12 @@ class Middleware {

const transferMemFsFiles = (fileSystem, cb) => {
const isoConfig = loadIsomorphicConfig();
const loadableStats = `/${LOADABLE_STATS}`;

const loadableStats = `/server/${LOADABLE_STATS}`;
if (fileSystem.existsSync(loadableStats)) {
const source = fileSystem.readFileSync(loadableStats);
const dir = Path.resolve("./dist/server");
if (!Fs.existsSync(dir)) shell.mkdir("-p", dir);
Fs.writeFileSync(`${dir}${loadableStats}`, source);
Fs.writeFileSync(`${dir}/${LOADABLE_STATS}`, source);
}

if (isoConfig.assetsFile) {
Expand Down

0 comments on commit 8de7ff7

Please sign in to comment.