diff --git a/package/ctcgfw/sub-web/Makefile b/package/ctcgfw/sub-web/Makefile index f502bae045..199d8f1476 100644 --- a/package/ctcgfw/sub-web/Makefile +++ b/package/ctcgfw/sub-web/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sub-web PKG_VERSION:=1.0.0 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/CareyWang/sub-web.git diff --git a/package/ctcgfw/sub-web/patches/010-dist-support-run-in-curdir.patch b/package/ctcgfw/sub-web/patches/010-dist-support-run-in-curdir.patch new file mode 100644 index 0000000000..750d2ef3c5 --- /dev/null +++ b/package/ctcgfw/sub-web/patches/010-dist-support-run-in-curdir.patch @@ -0,0 +1,57 @@ +From 4359c358bd434d1d0b182a13a743881ee21e7d27 Mon Sep 17 00:00:00 2001 +From: CN_SZTL +Date: Mon, 11 Jan 2021 11:22:43 +0000 +Subject: [PATCH] dist: support run in curdir + +As https://cli.vuejs.org/config/#vue-config-js said: +``` +By default, Vue CLI assumes your app will be deployed at the root of +a domain, e.g. https://www.my-app.com/. If your app is deployed at a +sub-path, you will need to specify that sub-path using this option. +For example, if your app is deployed at https://www.foobar.com/my-app/, +set publicPath to '/my-app/'. + +The value can also be set to an empty string ('') or a relative path (./) +so that all assets are linked using relative paths. This allows the built +bundle to be deployed under any public path, or used in a file system based +environment like a Cordova hybrid app. +``` + +Reference: + - CareyWang/sub-web#38 + - CareyWang/sub-web#43 + +Signed-off-by: CN_SZTL +--- + src/router/index.js | 2 +- + vue.config.js | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/router/index.js b/src/router/index.js +index 643aa66..583fdd9 100644 +--- a/src/router/index.js ++++ b/src/router/index.js +@@ -5,7 +5,7 @@ Vue.use(VueRouter); + + const routes = [ + { +- path: "/", ++ path: "*", + name: "SubConverter", + component: () => import("../views/Subconverter.vue") + } +diff --git a/vue.config.js b/vue.config.js +index c4b040b..89b25db 100644 +--- a/vue.config.js ++++ b/vue.config.js +@@ -5,6 +5,7 @@ function resolve(dir) { + } + + module.exports = { ++ publicPath: '', + css: { + loaderOptions: { + less: { +-- +2.17.1 +