mirror of
https://github.com/doocs/md.git
synced 2024-11-24 19:10:34 +08:00
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>
This commit is contained in:
parent
2d4f8b1840
commit
2cb5e34af3
@ -8,6 +8,7 @@
|
||||
"build:app-plus": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build",
|
||||
"build:custom": "cross-env NODE_ENV=production uniapp-cli custom",
|
||||
"build:h5": "cross-env NODE_ENV=production UNI_OUTPUT_DIR=dist UNI_PLATFORM=h5 vue-cli-service uni-build",
|
||||
"build:h5-netlify": "cross-env NODE_ENV=production SERVER_ENV=NETLIFY UNI_OUTPUT_DIR=dist UNI_PLATFORM=h5 vue-cli-service uni-build",
|
||||
"build:mp-360": "cross-env NODE_ENV=production UNI_PLATFORM=mp-360 vue-cli-service uni-build",
|
||||
"build:mp-alipay": "cross-env NODE_ENV=production UNI_PLATFORM=mp-alipay vue-cli-service uni-build",
|
||||
"build:mp-baidu": "cross-env NODE_ENV=production UNI_PLATFORM=mp-baidu vue-cli-service uni-build",
|
||||
|
@ -6,7 +6,7 @@
|
||||
"versionCode": "100",
|
||||
"transformPx": false,
|
||||
"h5": {
|
||||
"publicPath": "/md/"
|
||||
"publicPath": "/"
|
||||
},
|
||||
"app-plus": {
|
||||
"usingComponents": true,
|
||||
|
@ -7,7 +7,7 @@ function writeManifestJson() {
|
||||
const strData = data.toString();
|
||||
const manifest = JSON.parse(strData);
|
||||
|
||||
manifest.h5.publicPath = process.env.NETLIFY ? "/" : "/md/";
|
||||
manifest.h5.publicPath = process.env.SERVER_ENV !== 'NETLIFY' ? "/md/": "/";
|
||||
const result = JSON.stringify(manifest, null, 4);
|
||||
|
||||
fs.writeFile("./src/manifest.json", result, function (err) {
|
||||
|
Loading…
Reference in New Issue
Block a user