Skip to content

Commit ac542c0

Browse files
committed
fix: undefineds in client. fixes #78, #95
1 parent 837d8f1 commit ac542c0

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

client.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,23 @@
1414
*/
1515

1616
(() => {
17-
// eslint-disable-next-line global-require
17+
/* eslint-disable global-require */
1818
const { run } = require('./lib/client/client');
19-
run(__webpack_hash__, ʎɐɹɔosǝʌɹǝs);
19+
let hash = '<unknown>';
20+
let options;
21+
try {
22+
options = ʎɐɹɔosǝʌɹǝs;
23+
} catch (e) {
24+
const log = require('./lib/client/log');
25+
log.error(
26+
'The entry for webpack-plugin-serve was included in your build, but it does not appear that the plugin was. Please check your configuration.'
27+
);
28+
}
29+
30+
try {
31+
// eslint-disable-next-line camelcase
32+
hash = __webpack_hash__;
33+
} catch (e) {} // eslint-disable-line no-empty
34+
35+
run(hash, options);
2036
})();

0 commit comments

Comments
 (0)