@rebasepro/types 0.36.0 → 0.37.1
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/dist/index.es.js +6 -1
- package/dist/index.es.js.map +1 -1
- package/dist/types/content_hash.d.ts +15 -0
- package/package.json +1 -1
|
@@ -18,3 +18,18 @@
|
|
|
18
18
|
* rather than pinned in every visitor's cache with no way to recall it.
|
|
19
19
|
*/
|
|
20
20
|
export declare function isContentHashedFileName(fileName: string): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Below this many bytes a compressed response saves less than its headers
|
|
23
|
+
* cost: the runtime's on-the-fly compression threshold, and the floor under
|
|
24
|
+
* which a build writes no `.br`/`.gz` sibling.
|
|
25
|
+
*/
|
|
26
|
+
export declare const PRECOMPRESS_MIN_BYTES = 1024;
|
|
27
|
+
/**
|
|
28
|
+
* Whether a build writes `.br` and `.gz` beside this file: content-hashed (so
|
|
29
|
+
* the runtime serves it `immutable` and a sibling can never go stale) and of a
|
|
30
|
+
* type worth compressing. The size floor is {@link PRECOMPRESS_MIN_BYTES}.
|
|
31
|
+
*
|
|
32
|
+
* One rule for `rebase build` (`precompressStaticAssets` in the CLI) and the
|
|
33
|
+
* Vite plugin (`rebasePrecompress` in `@rebasepro/app/vitePlugin`).
|
|
34
|
+
*/
|
|
35
|
+
export declare function isPrecompressibleAsset(fileName: string): boolean;
|