diff --git a/src/server/index.tsx b/src/server/index.tsx index 5dd83031..e9c907f7 100644 --- a/src/server/index.tsx +++ b/src/server/index.tsx @@ -19,7 +19,7 @@ const [hostname, port] = process.env["LEMMY_UI_HOST"] server.use(express.json()); server.use(express.urlencoded({ extended: false })); -server.use(`/static-${COMMIT_HASH}`, express.static(path.resolve("./dist"))); +server.use(`/static/${COMMIT_HASH}`, express.static(path.resolve("./dist"))); server.use(setCacheControl); if (!process.env["LEMMY_UI_DISABLE_CSP"] && !process.env["LEMMY_UI_DEBUG"]) { diff --git a/src/server/utils/create-ssr-html.tsx b/src/server/utils/create-ssr-html.tsx index d77df26a..0a4ec22f 100644 --- a/src/server/utils/create-ssr-html.tsx +++ b/src/server/utils/create-ssr-html.tsx @@ -88,7 +88,7 @@ export async function createSsrHtml( - + ${helmet.link.toString() || fallbackTheme} @@ -103,7 +103,7 @@ export async function createSsrHtml(
${root}
- + `; diff --git a/src/shared/components/common/icon.tsx b/src/shared/components/common/icon.tsx index 7060e9c9..10f59c7b 100644 --- a/src/shared/components/common/icon.tsx +++ b/src/shared/components/common/icon.tsx @@ -24,7 +24,7 @@ export class Icon extends Component { })} >
{this.props.icon} diff --git a/src/shared/components/person/person-listing.tsx b/src/shared/components/person/person-listing.tsx index a8fc0dae..169a93f1 100644 --- a/src/shared/components/person/person-listing.tsx +++ b/src/shared/components/person/person-listing.tsx @@ -90,7 +90,7 @@ export class PersonListing extends Component { showAvatars() && ( diff --git a/src/shared/config.ts b/src/shared/config.ts index 6b0a190d..cb0f8e1e 100644 --- a/src/shared/config.ts +++ b/src/shared/config.ts @@ -1,7 +1,7 @@ import { COMMIT_HASH } from "./version"; -export const favIconUrl = `/static-${COMMIT_HASH}/assets/icons/favicon.svg`; -export const favIconPngUrl = `/static-${COMMIT_HASH}/assets/icons/apple-touch-icon.png`; +export const favIconUrl = `/static/${COMMIT_HASH}/assets/icons/favicon.svg`; +export const favIconPngUrl = `/static/${COMMIT_HASH}/assets/icons/apple-touch-icon.png`; export const repoUrl = "https://github.com/LemmyNet"; export const joinLemmyUrl = "https://join-lemmy.org"; diff --git a/webpack.config.js b/webpack.config.js index 268d9eca..0b03f6d9 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -101,7 +101,7 @@ const createClientConfig = (_env, mode) => { entry: "./src/client/index.tsx", output: { filename: "js/client.js", - publicPath: `/static-${commitHash}`, + publicPath: `/static/${commitHash}`, }, plugins: [ ...base.plugins, @@ -109,7 +109,7 @@ const createClientConfig = (_env, mode) => { enableInDevelopment: mode !== "development", // this may seem counterintuitive, but it is correct workbox: { modifyURLPrefix: { - "/": `/static-${commitHash}/`, + "/": `/static/${commitHash}/`, }, cacheId: "lemmy", include: [/(assets|styles)\/.+\..+|client\.js$/g],