Remove unused file and fix lint warnings
This commit is contained in:
parent
a889385261
commit
05e8cffee7
server
|
@ -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;
|
|
@ -3,7 +3,7 @@ const warning = require("warning");
|
|||
|
||||
const config = require("../config");
|
||||
|
||||
const bareIdentifierFormat = /^((?:@[^\/]+\/)?[^\/]+)(\/.*)?$/;
|
||||
const bareIdentifierFormat = /^((?:@[^/]+\/)?[^/]+)(\/.*)?$/;
|
||||
|
||||
function unpkgRewrite(dependencies = {}) {
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue