md-wechat/vue.config.js
JimQing 2cb5e34af3
fix: support netlify build env
* update frame to uni-app

* fix: bug fix

* fix: bug fix

* 修改输出路径

* feat: publicPath

* feat: manifest update

* fix: cssEditor theme

* fix: style

* style: format code with prettier

* fix: table style & copy style on the night mode

* fix: upload image

* fix: style

* feat: build:h5 for netlify

* delete console

* fix: netlify publicPath

Co-authored-by: yanglbme <szuyanglb@outlook.com>
2021-02-28 15:39:08 +08:00

21 lines
542 B
JavaScript

const fs = require("fs");
function writeManifestJson() {
fs.readFile("./src/manifest.json", function (err, data) {
if (err) {
return console.error(err);
}
const strData = data.toString();
const manifest = JSON.parse(strData);
manifest.h5.publicPath = process.env.SERVER_ENV !== 'NETLIFY' ? "/md/": "/";
const result = JSON.stringify(manifest, null, 4);
fs.writeFile("./src/manifest.json", result, function (err) {
if (err) {
console.error(err);
}
});
});
}
writeManifestJson();