Skip to content

Commit 4db6c00

Browse files
committed
change default compressFormat to brotli
1 parent b43c24a commit 4db6c00

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Compress format.
7575

7676
https://developer.mozilla.org/en-US/docs/Web/API/DecompressionStream/DecompressionStream
7777

78-
default: `"deflate-raw"`
78+
default: `"brotli"`
7979

8080
type:
8181
- `"deflate-raw"`

src/options.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export interface Options {
2828
*
2929
* @type {"deflate-raw" | "deflate" | "gzip" | "brotli" | "zstd" | "deflateRaw" | "gz" | "br" | "brotliCompress" | "zstandard" | "zst"}
3030
*
31-
* @default "deflate-raw"
31+
* @default "brotli"
3232
*/
3333
compressFormat?: CompressFormat | CompressFormatAlias
3434

@@ -69,7 +69,7 @@ export interface Options {
6969

7070
/**
7171
* Use import.meta polyfill.
72-
* @default false
72+
* @default true
7373
*/
7474
useImportMetaPolyfill?: boolean
7575
}
@@ -118,7 +118,7 @@ export function getInnerOptions(opt?: Options): InnerOptions {
118118
? compressFormatAlias[opt.compressFormat as CompressFormatAlias]
119119
: String(opt.compressFormat) as CompressFormat
120120
)
121-
: "deflate-raw",
121+
: "brotli",
122122

123123
compressor:
124124
typeof opt.compressor == 'function' ? opt.compressor : undefined,
@@ -141,7 +141,7 @@ export function getInnerOptions(opt?: Options): InnerOptions {
141141
opt.removeInlinedPublicIconFiles ?? true,
142142

143143
useImportMetaPolyfill:
144-
opt.useImportMetaPolyfill ?? false,
144+
opt.useImportMetaPolyfill ?? true,
145145
}
146146
}
147147

test/src/md-vue/options.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ If false, use Base64.<br>
2525
<h3>compressFormat</h3>
2626
<p>Compress format.</p>
2727
<p><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/API/DecompressionStream/DecompressionStream">https://developer.mozilla.org/en-US/docs/Web/API/DecompressionStream/DecompressionStream</a></p>
28-
<p>default: <code>&quot;deflate-raw&quot;</code></p>
28+
<p>default: <code>&quot;brotli&quot;</code></p>
2929
<p>type:</p>
3030
<ul>
3131
<li><code>&quot;deflate-raw&quot;</code></li>
@@ -69,7 +69,7 @@ If false, use Base64.<br>
6969
<p>type: <code>boolean</code></p>
7070
<h3>useImportMetaPolyfill</h3>
7171
<p>Use import.meta polyfill.</p>
72-
<p>default: <code>false</code></p>
72+
<p>default: <code>true</code></p>
7373
<p>type: <code>boolean</code></p>
7474

7575
</template>

test/src/md/options.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Compress format.
3838

3939
https://developer.mozilla.org/en-US/docs/Web/API/DecompressionStream/DecompressionStream
4040

41-
default: `"deflate-raw"`
41+
default: `"brotli"`
4242

4343
type:
4444
- `"deflate-raw"`
@@ -105,6 +105,6 @@ type: `boolean`
105105

106106
Use import.meta polyfill.
107107

108-
default: `false`
108+
default: `true`
109109

110110
type: `boolean`

0 commit comments

Comments
 (0)