mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-13 11:35:28 +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 = `
|
||||
|
||||
import(${stringify(sapper_dev_client)}).then(client => {
|
||||
client.connect(${dev_port});
|
||||
});`.replace(/^\t{3}/gm, '');
|
||||
if (typeof window !== 'undefined') {
|
||||
import(${stringify(sapper_dev_client)}).then(client => {
|
||||
client.connect(${dev_port});
|
||||
});
|
||||
}`.replace(/^\t{3}/gm, '');
|
||||
}
|
||||
|
||||
return `// This file is generated by Sapper — do not edit it!\n` + template
|
||||
|
||||
Reference in New Issue
Block a user