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:
JimQing 2021-02-28 15:39:08 +08:00 committed by GitHub
parent 2d4f8b1840
commit 2cb5e34af3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 69 additions and 68 deletions

View File

@ -8,6 +8,7 @@
"build:app-plus": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build", "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: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": "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-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-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", "build:mp-baidu": "cross-env NODE_ENV=production UNI_PLATFORM=mp-baidu vue-cli-service uni-build",

View File

@ -6,7 +6,7 @@
"versionCode": "100", "versionCode": "100",
"transformPx": false, "transformPx": false,
"h5": { "h5": {
"publicPath": "/md/" "publicPath": "/"
}, },
"app-plus": { "app-plus": {
"usingComponents": true, "usingComponents": true,

View File

@ -7,7 +7,7 @@ function writeManifestJson() {
const strData = data.toString(); const strData = data.toString();
const manifest = JSON.parse(strData); 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); const result = JSON.stringify(manifest, null, 4);
fs.writeFile("./src/manifest.json", result, function (err) { fs.writeFile("./src/manifest.json", result, function (err) {