mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-22 07:05:24 +00:00
ensure dev client is not imported if server imports client.js
This commit is contained in:
@@ -127,9 +127,11 @@ function generate_client(
|
|||||||
|
|
||||||
footer = `
|
footer = `
|
||||||
|
|
||||||
import(${stringify(sapper_dev_client)}).then(client => {
|
if (typeof window !== 'undefined') {
|
||||||
client.connect(${dev_port});
|
import(${stringify(sapper_dev_client)}).then(client => {
|
||||||
});`.replace(/^\t{3}/gm, '');
|
client.connect(${dev_port});
|
||||||
|
});
|
||||||
|
}`.replace(/^\t{3}/gm, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
return `// This file is generated by Sapper — do not edit it!\n` + template
|
return `// This file is generated by Sapper — do not edit it!\n` + template
|
||||||
|
|||||||
Reference in New Issue
Block a user