mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-07-29 22:18:31 +00:00
More webpack 4 code. Make sure to asynchronously await the availability of our webpack hook everywhere that we use it that it's reasonable to wait.
This adds a new module called switchboard that abuses the root React Router instance to forcibly load a chunk, letting us grab `require()` quickly rather than waiting potentially forever for another chunk to be loaded due to user action, etc.
This commit is contained in:
parent
194f93414d
commit
86c5fee033
13 changed files with 128 additions and 24 deletions
|
@ -329,8 +329,8 @@ export default class ChatHook extends Module {
|
|||
}
|
||||
|
||||
|
||||
grabTypes() {
|
||||
const ct = this.web_munch.getModule('chat-types');
|
||||
async grabTypes() {
|
||||
const ct = await this.web_munch.findModule('chat-types');
|
||||
|
||||
this.automod_types = ct && ct.a || AUTOMOD_TYPES;
|
||||
this.chat_types = ct && ct.b || CHAT_TYPES;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue