CSS static resources url to file path mappings

master
Yohany Flores Suarez 5 years ago committed by Quentin McGaw
parent 86a7b08512
commit a90e2f2b1a

@ -21,6 +21,7 @@ RUN wget -q https://github.com/benweet/stackedit/archive/${STACKEDIT_VERSION}.ta
RUN npm install
RUN npm audit fix
ENV NODE_ENV=production
RUN sed -i "s/assetsPublicPath: '\/',/assetsPublicPath: '.\/',/g" config/index.js && cat config/index.js
RUN npm run build
FROM scratch AS final

@ -62,9 +62,13 @@ func main() {
case "/oauth2/callback":
filepath = "/static/oauth2/callback.html"
case "/app", "/app/":
filepath = "/dist/"
filepath = "/dist/index.html"
default:
switch {
case strings.HasPrefix(urlStackeditPath, "/static/css/static/fonts/"):
filepath = "/dist/" + strings.TrimPrefix(urlStackeditPath, "/static/css/")
case strings.HasPrefix(urlStackeditPath, "/app/static/css/static/fonts/"):
filepath = "/dist/" + strings.TrimPrefix(urlStackeditPath, "/app/static/css/")
case strings.HasPrefix(urlStackeditPath, "/app/"):
filepath = "/dist/" + strings.TrimPrefix(urlStackeditPath, "/app/")
}

Loading…
Cancel
Save