@absolutejs/absolute 0.19.0-beta.1126 → 0.19.0-beta.1127

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -105,6 +105,26 @@ export const server = new Elysia()
105
105
  2. Route handlers (`handleReactPageRequest`, `handleSveltePageRequest`, …) stream HTML and inject scripts/assets based on that manifest.
106
106
  3. The static plugin serves all compiled files from `/build`.
107
107
 
108
+ ### Immutable production images
109
+
110
+ Build production assets and the server bundle while constructing the image,
111
+ then launch that prepared output without writing to it at runtime:
112
+
113
+ ```bash
114
+ absolute prepare src/server.ts --outdir build
115
+ absolute start src/server.ts --outdir build --prebuilt
116
+ ```
117
+
118
+ If image optimization is enabled in a read-only container, configure its
119
+ runtime cache on a bounded writable filesystem such as a `tmpfs`:
120
+
121
+ ```ts
122
+ export default defineConfig({
123
+ buildDirectory: 'build',
124
+ images: { cacheDirectory: '/tmp/absolutejs-image-cache' }
125
+ });
126
+ ```
127
+
108
128
  ---
109
129
 
110
130
  ## Plugin System
@@ -9154,8 +9154,8 @@ var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY, OPTIMIZATION_END
9154
9154
  const device = config?.deviceSizes ?? DEFAULT_DEVICE_SIZES;
9155
9155
  const image = config?.imageSizes ?? DEFAULT_IMAGE_SIZES;
9156
9156
  return [...device, ...image].sort((left, right) => left - right);
9157
- }, getCacheDir = (buildDir) => {
9158
- const dir = join(buildDir, ".cache", "images");
9157
+ }, getCacheDir = (buildDir, cacheDirectory) => {
9158
+ const dir = cacheDirectory ? resolve(cacheDirectory) : join(buildDir, ".cache", "images");
9159
9159
  if (!existsSync(dir))
9160
9160
  mkdirSync(dir, { recursive: true });
9161
9161
  return dir;
@@ -10361,5 +10361,5 @@ export {
10361
10361
  ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER
10362
10362
  };
10363
10363
 
10364
- //# debugId=5073D647956CB16864756E2164756E21
10364
+ //# debugId=7F459B45B76DA26564756E2164756E21
10365
10365
  //# sourceMappingURL=browser.js.map