mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-21 06:45:00 +00:00
@@ -60,7 +60,8 @@ async function _export({
|
|||||||
sander.copyFileSync(build_dir, 'service-worker.js.map').to(export_dir, 'service-worker.js.map');
|
sander.copyFileSync(build_dir, 'service-worker.js.map').to(export_dir, 'service-worker.js.map');
|
||||||
}
|
}
|
||||||
|
|
||||||
const port = await ports.find(3000);
|
const defaultPort = process.env.PORT ? parseInt(process.env.PORT) : 3000;
|
||||||
|
const port = await ports.find(defaultPort);
|
||||||
|
|
||||||
const protocol = 'http:';
|
const protocol = 'http:';
|
||||||
const host = `localhost:${port}`;
|
const host = `localhost:${port}`;
|
||||||
@@ -199,4 +200,4 @@ async function _export({
|
|||||||
function get_href(attrs: string) {
|
function get_href(attrs: string) {
|
||||||
const match = /href\s*=\s*(?:"(.*?)"|'(.+?)'|([^\s>]+))/.exec(attrs);
|
const match = /href\s*=\s*(?:"(.*?)"|'(.+?)'|([^\s>]+))/.exec(attrs);
|
||||||
return match[1] || match[2] || match[3];
|
return match[1] || match[2] || match[3];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user