mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix common & static paths
This commit is contained in:
1 parent
8e510f5aac
commit
a4d66fffda
2 files changed
+3
-5
No files matched your search
+1
-3
@@ -15,8 +15,6 @@ const Call = require('@hapi/call');
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const Subtext = require('@hapi/subtext');
|
||||
|
||||
const assetsPath = path.join(__static, "build/client")
|
||||
|
||||
const mimeTypes: {[key: string]: string} = {
|
||||
"html": "text/html",
|
||||
"txt": "text/plain",
|
||||
@@ -87,7 +85,7 @@ export class Router {
|
||||
}
|
||||
|
||||
protected handleStaticFile(file: string, response: http.ServerResponse) {
|
||||
const asset = path.join(assetsPath, file)
|
||||
const asset = path.join(__static, file)
|
||||
readFile(asset, (err, data) => {
|
||||
if (err) {
|
||||
// default to index.html so that react routes work when page is refreshed
|
||||
|
||||
Reference in new issue
Block a user