mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-28 23:31:14 +00:00
Address PR feedback
This commit is contained in:
parent
aaf9bc970c
commit
c7ea1b7c56
6 changed files with 9 additions and 9 deletions
|
@ -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"]) {
|
||||
|
|
|
@ -88,7 +88,7 @@ export async function createSsrHtml(
|
|||
<link rel="apple-touch-startup-image" href=${appleTouchIcon} />
|
||||
|
||||
<!-- Styles -->
|
||||
<link rel="stylesheet" type="text/css" href="/static-${COMMIT_HASH}/styles/styles.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/static/${COMMIT_HASH}/styles/styles.css" />
|
||||
|
||||
<!-- Current theme and more -->
|
||||
${helmet.link.toString() || fallbackTheme}
|
||||
|
@ -103,7 +103,7 @@ export async function createSsrHtml(
|
|||
</noscript>
|
||||
|
||||
<div id='root'>${root}</div>
|
||||
<script defer src='/static-${COMMIT_HASH}/js/client.js'></script>
|
||||
<script defer src='/static/${COMMIT_HASH}/js/client.js'></script>
|
||||
</body>
|
||||
</html>
|
||||
`;
|
||||
|
|
|
@ -24,7 +24,7 @@ export class Icon extends Component<IconProps, any> {
|
|||
})}
|
||||
>
|
||||
<use
|
||||
xlinkHref={`/static-${COMMIT_HASH}/assets/symbols.svg#icon-${this.props.icon}`}
|
||||
xlinkHref={`/static/${COMMIT_HASH}/assets/symbols.svg#icon-${this.props.icon}`}
|
||||
></use>
|
||||
<div className="visually-hidden">
|
||||
<title>{this.props.icon}</title>
|
||||
|
|
|
@ -90,7 +90,7 @@ export class PersonListing extends Component<PersonListingProps, any> {
|
|||
showAvatars() && (
|
||||
<PictrsImage
|
||||
src={
|
||||
avatar ?? `/static-${COMMIT_HASH}/assets/icons/icon-96x96.png`
|
||||
avatar ?? `/static/${COMMIT_HASH}/assets/icons/icon-96x96.png`
|
||||
}
|
||||
icon
|
||||
/>
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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],
|
||||
|
|
Loading…
Reference in a new issue