mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 19:12:27 +08:00
fix(nx/client): proxying of libraries
This commit is contained in:
parent
b213f9940e
commit
44b778fde6
@ -12,6 +12,7 @@ export async function initLocale() {
|
|||||||
locales = await server.get<Locale[]>("options/locales");
|
locales = await server.get<Locale[]>("options/locales");
|
||||||
|
|
||||||
await i18next.use(i18nextHttpBackend).init({
|
await i18next.use(i18nextHttpBackend).init({
|
||||||
|
debug: true,
|
||||||
lng: locale,
|
lng: locale,
|
||||||
fallbackLng: "en",
|
fallbackLng: "en",
|
||||||
backend: {
|
backend: {
|
||||||
|
@ -42,7 +42,11 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
baseHref: '/',
|
baseHref: '/',
|
||||||
assets: ["./src/assets", "./src/stylesheets"],
|
assets: [
|
||||||
|
"./src/assets",
|
||||||
|
"./src/stylesheets",
|
||||||
|
"./src/libraries",
|
||||||
|
],
|
||||||
styles: [],
|
styles: [],
|
||||||
outputHashing: process.env['NODE_ENV'] === 'production' ? 'all' : 'none',
|
outputHashing: process.env['NODE_ENV'] === 'production' ? 'all' : 'none',
|
||||||
optimization: process.env['NODE_ENV'] === 'production',
|
optimization: process.env['NODE_ENV'] === 'production',
|
||||||
|
@ -31,7 +31,9 @@ async function register(app: express.Application) {
|
|||||||
app.use(`/${assetPath}/stylesheets`, proxy(publicUrl, {
|
app.use(`/${assetPath}/stylesheets`, proxy(publicUrl, {
|
||||||
proxyReqPathResolver: (req) => "/stylesheets" + req.url
|
proxyReqPathResolver: (req) => "/stylesheets" + req.url
|
||||||
}));
|
}));
|
||||||
app.use(`/${assetPath}/libraries`, persistentCacheStatic(path.join(srcRoot, "../../client/libraries")));
|
app.use(`/${assetPath}/libraries`, proxy(publicUrl, {
|
||||||
|
proxyReqPathResolver: (req) => "/libraries" + req.url
|
||||||
|
}));
|
||||||
} else {
|
} else {
|
||||||
app.use(`/${assetPath}/app`, persistentCacheStatic(path.join(srcRoot, "public/app")));
|
app.use(`/${assetPath}/app`, persistentCacheStatic(path.join(srcRoot, "public/app")));
|
||||||
app.use(`/${assetPath}/app-dist`, persistentCacheStatic(path.join(srcRoot, "public/app-dist")));
|
app.use(`/${assetPath}/app-dist`, persistentCacheStatic(path.join(srcRoot, "public/app-dist")));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user