Skip to content

Commit a64fe26

Browse files
committed
require Fastboot only when its needed
1 parent b5d9c05 commit a64fe26

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33

44
function fastbootExpressMiddleware(distPath, options) {
5-
const FastBoot = require('fastboot');
6-
75
let opts = options;
86

97
if (arguments.length === 1) {
@@ -21,6 +19,7 @@ function fastbootExpressMiddleware(distPath, options) {
2119
let fastboot = opts.fastboot;
2220

2321
if (!fastboot) {
22+
let FastBoot = require('fastboot');
2423
fastboot = new FastBoot({
2524
distPath: opts.distPath,
2625
resilient: opts.resilient

0 commit comments

Comments
 (0)