Skip to content

Commit c45fb8b

Browse files
committed
fixes #1084: template literals causing errors on IE
1 parent 35295b7 commit c45fb8b

File tree

4 files changed

+15
-12
lines changed

4 files changed

+15
-12
lines changed

client/.eslintrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"rules": {
3+
"prefer-template": ["off"]
4+
}
5+
}

client/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function sendMsg(type, data) {
6565
!(self instanceof WorkerGlobalScope))
6666
) {
6767
self.postMessage({
68-
type: `webpack${type}`,
68+
type: 'webpack' + type,
6969
data
7070
}, '*');
7171
}
@@ -109,7 +109,7 @@ const onSocketMsg = {
109109
log.disableAll();
110110
break;
111111
default:
112-
log.error(`[WDS] Unknown clientLogLevel '${level}'`);
112+
log.error('[WDS] Unknown clientLogLevel \'' + level + '\'');
113113
}
114114
},
115115
overlay(value) {
@@ -129,7 +129,7 @@ const onSocketMsg = {
129129
}
130130
},
131131
'progress-update': function progressUpdate(data) {
132-
if (useProgress) log.info(`[WDS] ${data.percent}% - ${data.msg}.`);
132+
if (useProgress) log.info('[WDS] ' + data.percent + '% - ' + data.msg + '.');
133133
},
134134
ok() {
135135
sendMsg('Ok');
@@ -216,7 +216,7 @@ function reloadApp() {
216216
hotEmitter.emit('webpackHotUpdate', currentHash);
217217
if (typeof self !== 'undefined' && self.window) {
218218
// broadcast update to window
219-
self.postMessage(`webpackHotUpdate${currentHash}`, '*');
219+
self.postMessage('webpackHotUpdate' + currentHash, '*');
220220
}
221221
} else {
222222
log.info('[WDS] App updated. Reloading...');

client/live.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ $(() => {
6666
errors(errors) {
6767
status.text('App updated with errors. No reload!');
6868
okness.text('Errors while compiling.');
69-
$errors.text(`\n${stripAnsi(errors.join('\n\n\n'))}\n\n`);
69+
$errors.text('\n' + stripAnsi(errors.join('\n\n\n')) + '\n\n');
7070
header.css({
7171
borderColor: '#ebcb8b'
7272
});
@@ -99,7 +99,7 @@ $(() => {
9999
if (hot) {
100100
status.text('App hot update.');
101101
try {
102-
iframe[0].contentWindow.postMessage(`webpackHotUpdate${currentHash}`, '*');
102+
iframe[0].contentWindow.postMessage('webpackHotUpdate' + currentHash, '*');
103103
} catch (e) {
104104
console.warn(e); // eslint-disable-line
105105
}
@@ -110,7 +110,7 @@ $(() => {
110110
borderColor: '#96b5b4'
111111
});
112112
try {
113-
let old = `${iframe[0].contentWindow.location}`;
113+
let old = iframe[0].contentWindow.location + '';
114114
if (old.indexOf('about') === 0) old = null;
115115
iframe.attr('src', old || (contentPage + window.location.hash));
116116
if (old) {

client/overlay.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,9 @@ function ensureOverlayDivExists(onOverlayDivReady) {
9898
function showMessageOverlay(message) {
9999
ensureOverlayDivExists((div) => {
100100
// Make it look similar to our terminal.
101-
div.innerHTML =
102-
`<span style="color: #${
103-
colors.red
104-
}">Failed to compile.</span><br><br>${
105-
ansiHTML(entities.encode(message))}`;
101+
div.innerHTML = '<span style="color: #' + colors.red +
102+
'">Failed to compile.</span><br><br>' +
103+
ansiHTML(entities.encode(message));
106104
});
107105
}
108106

0 commit comments

Comments
 (0)