GeezerVison is showing github.com — :wrench: improved error logs · nullstack/nullstack@217a33e
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: client/index.js +5-5Lines changed: 5 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -109,17 +109,17 @@ export default class Nullstack { |
109 | 109 |
|
110 | 110 | if (module.hot) { |
111 | 111 | const socket = new WebSocket('ws' + router.base.slice(4) + '/ws'); |
112 | | - window.lastHash |
| 112 | + Nullstack.lastHash |
113 | 113 | socket.onmessage = async function (e) { |
114 | 114 | const data = JSON.parse(e.data) |
115 | 115 | if (data.type === 'NULLSTACK_SERVER_STARTED') { |
116 | | - (window.needsReload || !environment.hot) && window.location.reload() |
| 116 | + (Nullstack.needsReload || !environment.hot) && window.location.reload() |
117 | 117 | } else if (data.type === 'hash') { |
118 | 118 | const newHash = data.data.slice(20) |
119 | | - if (newHash === window.lastHash) { |
120 | | - window.needsReload = true |
| 119 | + if (newHash === Nullstack.lastHash) { |
| 120 | + Nullstack.needsReload = true |
121 | 121 | } else { |
122 | | - window.lastHash = newHash |
| 122 | + Nullstack.lastHash = newHash |
123 | 123 | } |
124 | 124 | } |
125 | 125 | }; |
|
Collapse file
Copy file name to clipboardExpand all lines: loaders/inject-hmr.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -26,11 +26,11 @@ module.exports = function (source) { |
26 | 26 |
|
27 | 27 | return source + ` |
28 | 28 | if (module.hot) { |
29 | | - if (window.needsClientReload) { |
| 29 | + if (Nullstack.needsClientReload) { |
30 | 30 | window.location.reload() |
31 | 31 | } |
32 | 32 | module.hot.accept() |
33 | | - window.needsClientReload = true |
| 33 | + Nullstack.needsClientReload = true |
34 | 34 | module.hot.accept('${klassPath}', () => { |
35 | 35 | Nullstack.hotReload(${klassName}) |
36 | 36 | }) |
|
Collapse file
Copy file name to clipboardExpand all lines: scripts/index.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -85,7 +85,7 @@ async function start({ input, port, env, mode = 'spa', cold, disk, loader = 'swc |
85 | 85 | host: process.env['NULLSTACK_PROJECT_DOMAIN'], |
86 | 86 | devMiddleware: { |
87 | 87 | index: false, |
88 | | - stats: 'none', |
| 88 | + stats: 'errors-only', |
89 | 89 | writeToDisk, |
90 | 90 | }, |
91 | 91 | client: { |
|