Add chunk name

This commit is contained in:
Surma
2018-12-17 16:45:06 +00:00
parent 672c57b61f
commit 98f61ba60c
2 changed files with 3 additions and 6 deletions

View File

@@ -70,6 +70,7 @@ export default class App extends Component<Props, State> {
}); });
window.addEventListener('popstate', this.onPopState); window.addEventListener('popstate', this.onPopState);
/* webpackChunkName: "client-api" */
import('./client-api').then(m => m.exposeAPI(this)); import('./client-api').then(m => m.exposeAPI(this));
} }

View File

@@ -396,7 +396,6 @@ export default class Compress extends Component<Props, State> {
const processor = this.leftProcessor; const processor = this.leftProcessor;
this.setState({ loadingCounter, loading: true }, this.signalProcessingStart); this.setState({ loadingCounter, loading: true }, this.signalProcessingStart);
// this.signalProcessingStart();
// Abort any current encode jobs, as they're redundant now. // Abort any current encode jobs, as they're redundant now.
this.leftProcessor.abortCurrent(); this.leftProcessor.abortCurrent();
this.rightProcessor.abortCurrent(); this.rightProcessor.abortCurrent();
@@ -444,9 +443,7 @@ export default class Compress extends Component<Props, State> {
this.updateDocumentTitle(file.name); this.updateDocumentTitle(file.name);
this.setState(newState); this.setState(newState);
} catch (err) { } catch (err) {
if (err.name === 'AbortError') { if (err.name === 'AbortError') return;
return;
}
console.error(err); console.error(err);
// Another file has been opened/processed before this one processed. // Another file has been opened/processed before this one processed.
if (this.state.loadingCounter !== loadingCounter) return; if (this.state.loadingCounter !== loadingCounter) return;
@@ -468,8 +465,7 @@ export default class Compress extends Component<Props, State> {
this.updateImageTimeoutIds[index] = self.setTimeout( this.updateImageTimeoutIds[index] = self.setTimeout(
() => { () => {
this.updateImage(index, options) this.updateImage(index, options) .catch((err) => {
.catch((err) => {
console.error(err); console.error(err);
}); });
}, },