Javascript Firebase在子文件夹中的单页VueJS应用程序中重写 背景

Javascript Firebase在子文件夹中的单页VueJS应用程序中重写 背景,javascript,firebase,vue.js,firebase-hosting,Javascript,Firebase,Vue.js,Firebase Hosting,我的网站结构如下: root — /public — index.html <— landing page — 404.html — /library — index.html <— single page VueJS app 问题 当应用程序开始路由到子路径时,例如,刷新将重定向到404,而不是library/index.html。您需要使用双星glob来匹配: "source": "/library/**" 单星只匹配一个斜杠,因此它

我的网站结构如下:

root
  — /public
    — index.html <— landing page
    — 404.html
    — /library 
      — index.html <— single page VueJS app
问题
当应用程序开始路由到子路径时,例如,刷新将重定向到404,而不是library/index.html。

您需要使用双星glob来匹配:

"source": "/library/**"

单星只匹配一个斜杠,因此它将匹配
/library/lists
,但不匹配
/library/lists/foo

谢谢,先生。如果还有其他人面临这个问题,重写也会改变我的javascript和图像的相关路径。绝对路径解决了这个问题。
"source": "/library/**"