Remove unused file and fix lint warnings

This commit is contained in:
Michael Jackson 2018-06-01 09:50:39 -07:00
parent a889385261
commit 05e8cffee7
2 changed files with 1 additions and 27 deletions

View File

@ -1,26 +0,0 @@
/**
* An express middleware that sets req.manifest from the build manifest
* in the given file. Should be used in production together with
* https://github.com/soundcloud/chunk-manifest-webpack-plugin
* to get consistent hashes.
*/
function assetsManifest(webpackManifestFile) {
let manifest;
try {
manifest = JSON.parse(fs.readFileSync(webpackManifestFile, "utf8"));
} catch (error) {
invariant(
false,
'assetsManifest middleware cannot read the manifest file "%s"; ' +
"run `yarn build` before starting the server",
webpackManifestFile
);
}
return (req, res, next) => {
req.manifest = manifest;
next();
};
}
module.exports = assetsManifest;

View File

@ -3,7 +3,7 @@ const warning = require("warning");
const config = require("../config");
const bareIdentifierFormat = /^((?:@[^\/]+\/)?[^\/]+)(\/.*)?$/;
const bareIdentifierFormat = /^((?:@[^/]+\/)?[^/]+)(\/.*)?$/;
function unpkgRewrite(dependencies = {}) {
return {