chore: set public path on the fly

pull/1373/head
Ramires Viana 2021-04-20 19:51:10 +00:00
parent 8a47aee137
commit 4711e7bcd5
2 changed files with 5 additions and 5 deletions

View File

@ -5,6 +5,9 @@
</template> </template>
<script> <script>
// eslint-disable-next-line no-undef
__webpack_public_path__ = window.FileBrowser.StaticURL + "/";
export default { export default {
name: "app", name: "app",
mounted() { mounted() {

View File

@ -126,12 +126,9 @@ func getStaticHandlers(store *storage.Storage, server *settings.Server, assetsFs
} }
} }
if !strings.HasSuffix(r.URL.Path, ".js") { http.FileServer(http.FS(assetsFs)).ServeHTTP(w, r)
http.FileServer(http.FS(assetsFs)).ServeHTTP(w, r)
return 0, nil
}
return handleWithStaticData(w, r, d, assetsFs, r.URL.Path, "application/javascript; charset=utf-8") return 0, nil
}, "/static/", store, server) }, "/static/", store, server)
return index, static return index, static