mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Fixed small boot time regression due to lack of dependency lazyloading
- when I extracted `mailgun-client` to a separate package, I accidentally removed the lazyloading for the `mailgun-js` library, which takes a non-negligible amount of time to require on boot - this fixes that by moving the require into the function where it's used
This commit is contained in:
parent
7f5d95ffff
commit
2a07b94bd4
1 changed files with 1 additions and 1 deletions
|
@ -1,7 +1,6 @@
|
|||
const _ = require('lodash');
|
||||
const debug = require('@tryghost/debug');
|
||||
const logging = require('@tryghost/logging');
|
||||
const mailgun = require('mailgun-js');
|
||||
|
||||
module.exports.BATCH_SIZE = 1000;
|
||||
|
||||
|
@ -187,6 +186,7 @@ module.exports = class MailgunClient {
|
|||
return null;
|
||||
}
|
||||
|
||||
const mailgun = require('mailgun-js');
|
||||
const baseUrl = new URL(mailgunConfig.baseUrl);
|
||||
|
||||
return mailgun({
|
||||
|
|
Loading…
Add table
Reference in a new issue