md/manifest.js

12 lines
311 B
JavaScript
Raw Normal View History

2021-02-28 16:57:58 +08:00
const fs = require("fs");
const manifest = require("./src/manifest.json");
manifest.h5.publicPath = process.env.SERVER_ENV !== "NETLIFY" ? "/md/" : "/";
const result = JSON.stringify(manifest, null, 2);
fs.writeFile("./src/manifest.json", result, function (err) {
if (err) {
console.error(err);
}
});