Fixes small issue with reading chunk files

This commit is contained in:
freedmand
2018-01-05 14:42:04 -08:00
parent d08f9eb5a4
commit fc8280adea

View File

@@ -7,7 +7,7 @@ const Spider = require('node-spider');
const path = require('path');
const { PORT = 3000, OUTPUT_DIR = 'dist' } = process.env;
const { dest = sapperDest } = require('../config.js');
const { dest } = require('../config.js');
const prefix = `http://localhost:${PORT}`;
@@ -81,7 +81,7 @@ function filter(url) {
*/
function getChunkFiles() {
const clientInfo =
fs.readJsonSync(path.join(sapperDest, 'stats.client.json'));
fs.readJsonSync(path.join(dest, 'stats.client.json'));
const chunkFiles = clientInfo.assets.map(chunk => `/client/${chunk.name}`);
return chunkFiles;
}