fix(nx/server): get images to work in dev mode
| @ -17,9 +17,5 @@ | |||||||
|     "eslint.config.cjs", |     "eslint.config.cjs", | ||||||
|     "eslint.config.mjs" |     "eslint.config.mjs" | ||||||
|   ], |   ], | ||||||
|   "references": [ |   "references": [] | ||||||
|     { |  | ||||||
|       "path": "../server/tsconfig.app.json" |  | ||||||
|     } |  | ||||||
|   ] |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -3,9 +3,6 @@ | |||||||
|   "files": [], |   "files": [], | ||||||
|   "include": [], |   "include": [], | ||||||
|   "references": [ |   "references": [ | ||||||
|     { |  | ||||||
|       "path": "../server" |  | ||||||
|     }, |  | ||||||
|     { |     { | ||||||
|       "path": "./tsconfig.app.json" |       "path": "./tsconfig.app.json" | ||||||
|     } |     } | ||||||
|  | |||||||
| Before Width: | Height: | Size: 805 B After Width: | Height: | Size: 805 B | 
| Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB | 
| Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB | 
| Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB | 
| Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB | 
| Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB | 
| @ -34,14 +34,15 @@ async function register(app: express.Application) { | |||||||
|         app.use(`/${assetPath}/libraries`, proxy(publicUrl, { |         app.use(`/${assetPath}/libraries`, proxy(publicUrl, { | ||||||
|             proxyReqPathResolver: (req) => "/libraries" + req.url |             proxyReqPathResolver: (req) => "/libraries" + req.url | ||||||
|         })); |         })); | ||||||
|  |         app.use(`/${assetPath}/images`, persistentCacheStatic(path.join(srcRoot, "assets", "images"))); | ||||||
|     } 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"))); | ||||||
|         app.use(`/${assetPath}/stylesheets`, persistentCacheStatic(path.join(srcRoot, "public/stylesheets"))); |         app.use(`/${assetPath}/stylesheets`, persistentCacheStatic(path.join(srcRoot, "public/stylesheets"))); | ||||||
|  |         app.use(`/${assetPath}/images`, persistentCacheStatic(path.join(srcRoot, "..", "images"))); | ||||||
|     } |     } | ||||||
|     app.use(`/${assetPath}/fonts`, persistentCacheStatic(path.join(srcRoot, "public/fonts"))); |     app.use(`/${assetPath}/fonts`, persistentCacheStatic(path.join(srcRoot, "public/fonts"))); | ||||||
|     app.use(`/assets/vX/fonts`, express.static(path.join(srcRoot, "public/fonts"))); |     app.use(`/assets/vX/fonts`, express.static(path.join(srcRoot, "public/fonts"))); | ||||||
|     app.use(`/${assetPath}/images`, persistentCacheStatic(path.join(srcRoot, "..", "images"))); |  | ||||||
|     app.use(`/assets/vX/images`, express.static(path.join(srcRoot, "..", "images"))); |     app.use(`/assets/vX/images`, express.static(path.join(srcRoot, "..", "images"))); | ||||||
|     app.use(`/assets/vX/stylesheets`, express.static(path.join(srcRoot, "public/stylesheets"))); |     app.use(`/assets/vX/stylesheets`, express.static(path.join(srcRoot, "public/stylesheets"))); | ||||||
|     app.use(`/${assetPath}/libraries`, persistentCacheStatic(path.join(srcRoot, "public/libraries"))); |     app.use(`/${assetPath}/libraries`, persistentCacheStatic(path.join(srcRoot, "public/libraries"))); | ||||||
|  | |||||||
| @ -24,11 +24,7 @@ module.exports = { | |||||||
|         { |         { | ||||||
|           from: "node_modules/better-sqlite3/build/Release", |           from: "node_modules/better-sqlite3/build/Release", | ||||||
|           to: join(outputDir, "Release") |           to: join(outputDir, "Release") | ||||||
|         },         |         },       | ||||||
|         { |  | ||||||
|           from: "../client/dist", |  | ||||||
|           to: join(outputDir, "app") |  | ||||||
|         } |  | ||||||
|       ] |       ] | ||||||
|     }) |     }) | ||||||
|   ] |   ] | ||||||
|  | |||||||