mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-07-05 02:28:31 +00:00
4.0.0-rc12.14
* Fixed: Twitch changed the internal structure of their dynamically loaded component system, preventing FrankerFaceZ from being able to force a new chunk to load to grab the internals of webpack.
This commit is contained in:
parent
0090e43316
commit
d4deb36f08
2 changed files with 38 additions and 15 deletions
|
@ -100,7 +100,7 @@ class FrankerFaceZ extends Module {
|
|||
FrankerFaceZ.Logger = Logger;
|
||||
|
||||
const VER = FrankerFaceZ.version_info = {
|
||||
major: 4, minor: 0, revision: 0, extra: '-rc12.13',
|
||||
major: 4, minor: 0, revision: 0, extra: '-rc12.14',
|
||||
commit: __git_commit__,
|
||||
build: __webpack_hash__,
|
||||
toString: () =>
|
||||
|
|
|
@ -65,8 +65,30 @@ export default class Switchboard extends Module {
|
|||
|
||||
this.log.info('Found Non-Matching Route', route.props.path);
|
||||
|
||||
const component_class = route.props.component;
|
||||
|
||||
let component;
|
||||
|
||||
if ( component_class.Preload ) {
|
||||
try {
|
||||
component = component_class.Preload();
|
||||
} catch(err) {
|
||||
this.log.error('Error instantiating preloader for forced chunk loading.', err);
|
||||
component = null;
|
||||
}
|
||||
|
||||
if ( ! component || ! component.props || ! component.props.loader )
|
||||
continue;
|
||||
|
||||
try {
|
||||
component.props.loader().then(() => {
|
||||
this.log.info('Successfully forced a chunk to load using route', route.props.path)
|
||||
});
|
||||
} catch(err) {
|
||||
this.log.warn('Unexpected result trying to use component pre-loader to force loading of another chunk.');
|
||||
}
|
||||
|
||||
} else {
|
||||
try {
|
||||
component = new route.props.component;
|
||||
} catch(err) {
|
||||
|
@ -84,6 +106,7 @@ export default class Switchboard extends Module {
|
|||
} catch(err) {
|
||||
this.log.warn('Unexpected result trying to use component loader to force loading of another chunk.');
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue