mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-18 13:35:08 +00:00
Fixes small issue with reading chunk files
This commit is contained in:
@@ -7,7 +7,7 @@ const Spider = require('node-spider');
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
const { PORT = 3000, OUTPUT_DIR = 'dist' } = process.env;
|
const { PORT = 3000, OUTPUT_DIR = 'dist' } = process.env;
|
||||||
const { dest = sapperDest } = require('../config.js');
|
const { dest } = require('../config.js');
|
||||||
|
|
||||||
const prefix = `http://localhost:${PORT}`;
|
const prefix = `http://localhost:${PORT}`;
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ function filter(url) {
|
|||||||
*/
|
*/
|
||||||
function getChunkFiles() {
|
function getChunkFiles() {
|
||||||
const clientInfo =
|
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}`);
|
const chunkFiles = clientInfo.assets.map(chunk => `/client/${chunk.name}`);
|
||||||
return chunkFiles;
|
return chunkFiles;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user