Move middleware utils into server/utils

This commit is contained in:
Michael Jackson
2018-05-21 13:26:00 -07:00
parent 269b756aeb
commit c792515d01
14 changed files with 59 additions and 40 deletions

View File

@ -1,6 +1,7 @@
const fs = require("fs");
const invariant = require("invariant");
const createBundle = require("./utils/createBundle");
const createBundle = require("../utils/createBundle");
/**
* An express middleware that sets req.bundle from the build
@ -14,7 +15,7 @@ function staticAssets(webpackStatsFile) {
invariant(
false,
"staticAssets middleware cannot read the build stats in %s; " +
"run `yarn build` before starting the server",
"run the `build` script before starting the server",
webpackStatsFile
);
}