@lynx-js/rspeedy-canary 0.11.1-canary-20250903-f52f8412 → 0.11.1-canary-20250903-e3c0b427

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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @lynx-js/rspeedy
2
2
 
3
- ## 0.11.1-canary-20250903094640-f52f8412a126ece6c49605372d460eea725757bf
3
+ ## 0.11.1-canary-20250903135316-e3c0b427af3403572b205ec01abedd5db17256c1
4
4
 
5
5
  ### Patch Changes
6
6
 
@@ -8,6 +8,21 @@
8
8
 
9
9
  - Bump Rsbuild v1.5.2 with Rspack v1.5.1. ([#1624](https://github.com/lynx-family/lynx-stack/pull/1624))
10
10
 
11
+ - Add `output.dataUriLimit.*` for fine-grained control of asset inlining. ([#1648](https://github.com/lynx-family/lynx-stack/pull/1648))
12
+
13
+ ```js
14
+ import { defineConfig } from "@lynx-js/rspeedy";
15
+
16
+ export default defineConfig({
17
+ output: {
18
+ dataUriLimit: {
19
+ image: 5000,
20
+ media: 0,
21
+ },
22
+ },
23
+ });
24
+ ```
25
+
11
26
  ## 0.11.0
12
27
 
13
28
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -16,6 +16,7 @@
16
16
  */
17
17
 
18
18
  import type { CreateRsbuildOptions } from '@rsbuild/core';
19
+ import type { DataUriLimit } from '@rsbuild/core';
19
20
  import type { DistPathConfig } from '@rsbuild/core';
20
21
  import type { InlineChunkConfig } from '@rsbuild/core';
21
22
  import { logger } from '@rsbuild/core';
@@ -1988,8 +1989,25 @@ export declare interface Output {
1988
1989
  * },
1989
1990
  * })
1990
1991
  * ```
1992
+ *
1993
+ * @example
1994
+ *
1995
+ * Disable inlining of all media but not images.
1996
+ *
1997
+ * ```ts title="lynx.config.ts"
1998
+ * import { defineConfig } from '@lynx-js/rspeedy'
1999
+ *
2000
+ * export default defineConfig({
2001
+ * output: {
2002
+ * dataUriLimit: {
2003
+ * image: 5000,
2004
+ * media: 0,
2005
+ * },
2006
+ * },
2007
+ * })
2008
+ * ```
1991
2009
  */
1992
- dataUriLimit?: number | undefined;
2010
+ dataUriLimit?: number | DataUriLimit | undefined;
1993
2011
  /**
1994
2012
  * Set the directory of the dist files.
1995
2013
  *
@@ -1492,9 +1492,9 @@ export const __webpack_modules__ = {
1492
1492
  if (void 0 === value) return true;
1493
1493
  return "string" == typeof value || "boolean" == typeof value;
1494
1494
  });
1495
- const _io41 = (input, _exceptionable = true)=>"string" == typeof input["__@toStringTag@6659"] && (1 === Object.keys(input).length || Object.keys(input).every((key)=>{
1495
+ const _io41 = (input, _exceptionable = true)=>"string" == typeof input["__@toStringTag@6661"] && (1 === Object.keys(input).length || Object.keys(input).every((key)=>{
1496
1496
  if ([
1497
- "__@toStringTag@6659"
1497
+ "__@toStringTag@6661"
1498
1498
  ].some((prop)=>key === prop)) return true;
1499
1499
  const value = input[key];
1500
1500
  if (void 0 === value) return true;
@@ -3102,14 +3102,14 @@ export const __webpack_modules__ = {
3102
3102
  if (void 0 === value) return true;
3103
3103
  return false;
3104
3104
  })));
3105
- const _io149 = (input, _exceptionable = true)=>"number" == typeof input.BYTES_PER_ELEMENT && (input.buffer instanceof ArrayBuffer || input.buffer instanceof SharedArrayBuffer) && "number" == typeof input.byteLength && "number" == typeof input.byteOffset && "number" == typeof input.length && "Uint8Array" === input["__@toStringTag@6659"] && Object.keys(input).every((key)=>{
3105
+ const _io149 = (input, _exceptionable = true)=>"number" == typeof input.BYTES_PER_ELEMENT && (input.buffer instanceof ArrayBuffer || input.buffer instanceof SharedArrayBuffer) && "number" == typeof input.byteLength && "number" == typeof input.byteOffset && "number" == typeof input.length && "Uint8Array" === input["__@toStringTag@6661"] && Object.keys(input).every((key)=>{
3106
3106
  if ([
3107
3107
  "BYTES_PER_ELEMENT",
3108
3108
  "buffer",
3109
3109
  "byteLength",
3110
3110
  "byteOffset",
3111
3111
  "length",
3112
- "__@toStringTag@6659"
3112
+ "__@toStringTag@6661"
3113
3113
  ].some((prop)=>key === prop)) return true;
3114
3114
  const value = input[key];
3115
3115
  if (void 0 === value) return true;
@@ -6363,15 +6363,15 @@ export const __webpack_modules__ = {
6363
6363
  if (void 0 === value) return true;
6364
6364
  return false;
6365
6365
  }));
6366
- const _io406 = (input, _exceptionable = true)=>"string" == typeof input["__@toStringTag@6659"] && (1 === Object.keys(input).length || Object.keys(input).every((key)=>{
6366
+ const _io406 = (input, _exceptionable = true)=>"string" == typeof input["__@toStringTag@6661"] && (1 === Object.keys(input).length || Object.keys(input).every((key)=>{
6367
6367
  if ([
6368
- "__@toStringTag@6659"
6368
+ "__@toStringTag@6661"
6369
6369
  ].some((prop)=>key === prop)) return true;
6370
6370
  const value = input[key];
6371
6371
  if (void 0 === value) return true;
6372
6372
  return false;
6373
6373
  }));
6374
- const _io407 = (input, _exceptionable = true)=>(void 0 === input.assetPrefix || "string" == typeof input.assetPrefix) && (void 0 === input.cleanDistPath || "boolean" == typeof input.cleanDistPath) && null !== input.copy && (void 0 === input.copy || Array.isArray(input.copy) && input.copy.every((elem, _index333)=>null != elem && ("string" == typeof elem || "object" == typeof elem && null !== elem && _io379(elem, _exceptionable))) || "object" == typeof input.copy && null !== input.copy && _io378(input.copy, _exceptionable)) && (void 0 === input.cssModules || "object" == typeof input.cssModules && null !== input.cssModules && false === Array.isArray(input.cssModules) && _io408(input.cssModules, _exceptionable)) && (void 0 === input.dataUriLimit || "number" == typeof input.dataUriLimit) && (void 0 === input.distPath || "object" == typeof input.distPath && null !== input.distPath && false === Array.isArray(input.distPath) && _io409(input.distPath, _exceptionable)) && null !== input.filename && (void 0 === input.filename || "string" == typeof input.filename || "object" == typeof input.filename && null !== input.filename && false === Array.isArray(input.filename) && _io410(input.filename, _exceptionable)) && (void 0 === input.filenameHash || "string" == typeof input.filenameHash || "boolean" == typeof input.filenameHash) && null !== input.inlineScripts && (void 0 === input.inlineScripts || "function" == typeof input.inlineScripts || "boolean" == typeof input.inlineScripts || input.inlineScripts instanceof RegExp || "object" == typeof input.inlineScripts && null !== input.inlineScripts && _io377(input.inlineScripts, _exceptionable)) && (void 0 === input.legalComments || "none" === input.legalComments || "inline" === input.legalComments || "linked" === input.legalComments) && null !== input.minify && (void 0 === input.minify || "boolean" == typeof input.minify || "object" == typeof input.minify && null !== input.minify && false === Array.isArray(input.minify) && _io411(input.minify, _exceptionable)) && null !== input.sourceMap && (void 0 === input.sourceMap || "boolean" == typeof input.sourceMap || "object" == typeof input.sourceMap && null !== input.sourceMap && false === Array.isArray(input.sourceMap) && _io412(input.sourceMap, _exceptionable)) && (0 === Object.keys(input).length || Object.keys(input).every((key)=>{
6374
+ const _io407 = (input, _exceptionable = true)=>(void 0 === input.assetPrefix || "string" == typeof input.assetPrefix) && (void 0 === input.cleanDistPath || "boolean" == typeof input.cleanDistPath) && null !== input.copy && (void 0 === input.copy || Array.isArray(input.copy) && input.copy.every((elem, _index333)=>null != elem && ("string" == typeof elem || "object" == typeof elem && null !== elem && _io379(elem, _exceptionable))) || "object" == typeof input.copy && null !== input.copy && _io378(input.copy, _exceptionable)) && (void 0 === input.cssModules || "object" == typeof input.cssModules && null !== input.cssModules && false === Array.isArray(input.cssModules) && _io408(input.cssModules, _exceptionable)) && null !== input.dataUriLimit && (void 0 === input.dataUriLimit || "number" == typeof input.dataUriLimit || "object" == typeof input.dataUriLimit && null !== input.dataUriLimit && false === Array.isArray(input.dataUriLimit) && _io362(input.dataUriLimit, _exceptionable)) && (void 0 === input.distPath || "object" == typeof input.distPath && null !== input.distPath && false === Array.isArray(input.distPath) && _io409(input.distPath, _exceptionable)) && null !== input.filename && (void 0 === input.filename || "string" == typeof input.filename || "object" == typeof input.filename && null !== input.filename && false === Array.isArray(input.filename) && _io410(input.filename, _exceptionable)) && (void 0 === input.filenameHash || "string" == typeof input.filenameHash || "boolean" == typeof input.filenameHash) && null !== input.inlineScripts && (void 0 === input.inlineScripts || "function" == typeof input.inlineScripts || "boolean" == typeof input.inlineScripts || input.inlineScripts instanceof RegExp || "object" == typeof input.inlineScripts && null !== input.inlineScripts && _io377(input.inlineScripts, _exceptionable)) && (void 0 === input.legalComments || "none" === input.legalComments || "inline" === input.legalComments || "linked" === input.legalComments) && null !== input.minify && (void 0 === input.minify || "boolean" == typeof input.minify || "object" == typeof input.minify && null !== input.minify && false === Array.isArray(input.minify) && _io411(input.minify, _exceptionable)) && null !== input.sourceMap && (void 0 === input.sourceMap || "boolean" == typeof input.sourceMap || "object" == typeof input.sourceMap && null !== input.sourceMap && false === Array.isArray(input.sourceMap) && _io412(input.sourceMap, _exceptionable)) && (0 === Object.keys(input).length || Object.keys(input).every((key)=>{
6375
6375
  if ([
6376
6376
  "assetPrefix",
6377
6377
  "cleanDistPath",
@@ -6959,9 +6959,9 @@ export const __webpack_modules__ = {
6959
6959
  if (void 0 === value) return true;
6960
6960
  return false;
6961
6961
  }));
6962
- const _io460 = (input, _exceptionable = true)=>"string" == typeof input["__@toStringTag@6659"] && (1 === Object.keys(input).length || Object.keys(input).every((key)=>{
6962
+ const _io460 = (input, _exceptionable = true)=>"string" == typeof input["__@toStringTag@6661"] && (1 === Object.keys(input).length || Object.keys(input).every((key)=>{
6963
6963
  if ([
6964
- "__@toStringTag@6659"
6964
+ "__@toStringTag@6661"
6965
6965
  ].some((prop)=>key === prop)) return true;
6966
6966
  const value = input[key];
6967
6967
  if (void 0 === value) return true;
@@ -6973,18 +6973,18 @@ export const __webpack_modules__ = {
6973
6973
  return false;
6974
6974
  })();
6975
6975
  const _iu1 = (input, _exceptionable = true)=>(()=>{
6976
- if (void 0 !== input["__@toStringTag@6659"]) return _io149(input, _exceptionable);
6976
+ if (void 0 !== input["__@toStringTag@6661"]) return _io149(input, _exceptionable);
6977
6977
  if (void 0 !== input.pem) return _io150(input, _exceptionable);
6978
6978
  return false;
6979
6979
  })();
6980
6980
  const _iu2 = (input, _exceptionable = true)=>(()=>{
6981
- if (void 0 !== input["__@toStringTag@6659"]) return _io149(input, _exceptionable);
6981
+ if (void 0 !== input["__@toStringTag@6661"]) return _io149(input, _exceptionable);
6982
6982
  if (void 0 !== input.buf) return _io151(input, _exceptionable);
6983
6983
  return false;
6984
6984
  })();
6985
6985
  const _iu3 = (input, _exceptionable = true)=>(()=>{
6986
6986
  if (void 0 !== input.name) return _io405(input, _exceptionable);
6987
- if (void 0 !== input["__@toStringTag@6659"]) return _io406(input, _exceptionable);
6987
+ if (void 0 !== input["__@toStringTag@6661"]) return _io406(input, _exceptionable);
6988
6988
  return false;
6989
6989
  })();
6990
6990
  const _iu4 = (input, _exceptionable = true)=>(()=>{
@@ -7057,7 +7057,7 @@ export const __webpack_modules__ = {
7057
7057
  return _io415(input, _exceptionable);
7058
7058
  })();
7059
7059
  const _iu18 = (input, _exceptionable = true)=>(()=>{
7060
- if (void 0 !== input["__@toStringTag@6659"]) return _io460(input, _exceptionable);
7060
+ if (void 0 !== input["__@toStringTag@6661"]) return _io460(input, _exceptionable);
7061
7061
  return _io0(input, _exceptionable);
7062
7062
  })();
7063
7063
  const _ia0 = (input, _exceptionable = true)=>input.every((elem, _index367)=>null != elem && ("function" == typeof elem || "string" == typeof elem || elem instanceof RegExp || Array.isArray(elem) && (_ia0(elem, _exceptionable) || false) || "object" == typeof elem && null !== elem && false === Array.isArray(elem) && _io174(elem, _exceptionable)));
@@ -9583,14 +9583,14 @@ export const __webpack_modules__ = {
9583
9583
  }).every((flag)=>flag)
9584
9584
  ].every((flag)=>flag);
9585
9585
  const _vo41 = (input, _path, _exceptionable = true)=>[
9586
- "string" == typeof input["__@toStringTag@6659"] || _report(_exceptionable, {
9587
- path: _path + "[\"__@toStringTag@6659\"]",
9586
+ "string" == typeof input["__@toStringTag@6661"] || _report(_exceptionable, {
9587
+ path: _path + "[\"__@toStringTag@6661\"]",
9588
9588
  expected: "string",
9589
- value: input["__@toStringTag@6659"]
9589
+ value: input["__@toStringTag@6661"]
9590
9590
  }),
9591
9591
  1 === Object.keys(input).length || false === _exceptionable || Object.keys(input).map((key)=>{
9592
9592
  if ([
9593
- "__@toStringTag@6659"
9593
+ "__@toStringTag@6661"
9594
9594
  ].some((prop)=>key === prop)) return true;
9595
9595
  const value = input[key];
9596
9596
  if (void 0 === value) return true;
@@ -18604,10 +18604,10 @@ export const __webpack_modules__ = {
18604
18604
  expected: "number",
18605
18605
  value: input.length
18606
18606
  }),
18607
- "Uint8Array" === input["__@toStringTag@6659"] || _report(_exceptionable, {
18608
- path: _path + "[\"__@toStringTag@6659\"]",
18607
+ "Uint8Array" === input["__@toStringTag@6661"] || _report(_exceptionable, {
18608
+ path: _path + "[\"__@toStringTag@6661\"]",
18609
18609
  expected: "\"Uint8Array\"",
18610
- value: input["__@toStringTag@6659"]
18610
+ value: input["__@toStringTag@6661"]
18611
18611
  }),
18612
18612
  false === _exceptionable || Object.keys(input).map((key)=>{
18613
18613
  if ([
@@ -18616,7 +18616,7 @@ export const __webpack_modules__ = {
18616
18616
  "byteLength",
18617
18617
  "byteOffset",
18618
18618
  "length",
18619
- "__@toStringTag@6659"
18619
+ "__@toStringTag@6661"
18620
18620
  ].some((prop)=>key === prop)) return true;
18621
18621
  const value = input[key];
18622
18622
  if (void 0 === value) return true;
@@ -36677,14 +36677,14 @@ export const __webpack_modules__ = {
36677
36677
  }).every((flag)=>flag)
36678
36678
  ].every((flag)=>flag);
36679
36679
  const _vo406 = (input, _path, _exceptionable = true)=>[
36680
- "string" == typeof input["__@toStringTag@6659"] || _report(_exceptionable, {
36681
- path: _path + "[\"__@toStringTag@6659\"]",
36680
+ "string" == typeof input["__@toStringTag@6661"] || _report(_exceptionable, {
36681
+ path: _path + "[\"__@toStringTag@6661\"]",
36682
36682
  expected: "string",
36683
- value: input["__@toStringTag@6659"]
36683
+ value: input["__@toStringTag@6661"]
36684
36684
  }),
36685
36685
  1 === Object.keys(input).length || false === _exceptionable || Object.keys(input).map((key)=>{
36686
36686
  if ([
36687
- "__@toStringTag@6659"
36687
+ "__@toStringTag@6661"
36688
36688
  ].some((prop)=>key === prop)) return true;
36689
36689
  const value = input[key];
36690
36690
  if (void 0 === value) return true;
@@ -36749,11 +36749,19 @@ export const __webpack_modules__ = {
36749
36749
  expected: "(CssModules | undefined)",
36750
36750
  value: input.cssModules
36751
36751
  }),
36752
- void 0 === input.dataUriLimit || "number" == typeof input.dataUriLimit || _report(_exceptionable, {
36752
+ (null !== input.dataUriLimit || _report(_exceptionable, {
36753
36753
  path: _path + ".dataUriLimit",
36754
- expected: "(number | undefined)",
36754
+ expected: "(DataUriLimit | number | undefined)",
36755
36755
  value: input.dataUriLimit
36756
- }),
36756
+ })) && (void 0 === input.dataUriLimit || "number" == typeof input.dataUriLimit || ("object" == typeof input.dataUriLimit && null !== input.dataUriLimit && false === Array.isArray(input.dataUriLimit) || _report(_exceptionable, {
36757
+ path: _path + ".dataUriLimit",
36758
+ expected: "(DataUriLimit | number | undefined)",
36759
+ value: input.dataUriLimit
36760
+ })) && _vo362(input.dataUriLimit, _path + ".dataUriLimit", _exceptionable) || _report(_exceptionable, {
36761
+ path: _path + ".dataUriLimit",
36762
+ expected: "(DataUriLimit | number | undefined)",
36763
+ value: input.dataUriLimit
36764
+ })),
36757
36765
  void 0 === input.distPath || ("object" == typeof input.distPath && null !== input.distPath && false === Array.isArray(input.distPath) || _report(_exceptionable, {
36758
36766
  path: _path + ".distPath",
36759
36767
  expected: "(DistPath | undefined)",
@@ -39725,14 +39733,14 @@ export const __webpack_modules__ = {
39725
39733
  }).every((flag)=>flag)
39726
39734
  ].every((flag)=>flag);
39727
39735
  const _vo460 = (input, _path, _exceptionable = true)=>[
39728
- "string" == typeof input["__@toStringTag@6659"] || _report(_exceptionable, {
39729
- path: _path + "[\"__@toStringTag@6659\"]",
39736
+ "string" == typeof input["__@toStringTag@6661"] || _report(_exceptionable, {
39737
+ path: _path + "[\"__@toStringTag@6661\"]",
39730
39738
  expected: "string",
39731
- value: input["__@toStringTag@6659"]
39739
+ value: input["__@toStringTag@6661"]
39732
39740
  }),
39733
39741
  1 === Object.keys(input).length || false === _exceptionable || Object.keys(input).map((key)=>{
39734
39742
  if ([
39735
- "__@toStringTag@6659"
39743
+ "__@toStringTag@6661"
39736
39744
  ].some((prop)=>key === prop)) return true;
39737
39745
  const value = input[key];
39738
39746
  if (void 0 === value) return true;
@@ -39758,7 +39766,7 @@ export const __webpack_modules__ = {
39758
39766
  });
39759
39767
  })();
39760
39768
  const _vu1 = (input, _path, _exceptionable = true)=>(()=>{
39761
- if (void 0 !== input["__@toStringTag@6659"]) return _vo149(input, _path, _exceptionable);
39769
+ if (void 0 !== input["__@toStringTag@6661"]) return _vo149(input, _path, _exceptionable);
39762
39770
  if (void 0 !== input.pem) return _vo150(input, _path, _exceptionable);
39763
39771
  return _report(_exceptionable, {
39764
39772
  path: _path,
@@ -39767,7 +39775,7 @@ export const __webpack_modules__ = {
39767
39775
  });
39768
39776
  })();
39769
39777
  const _vu2 = (input, _path, _exceptionable = true)=>(()=>{
39770
- if (void 0 !== input["__@toStringTag@6659"]) return _vo149(input, _path, _exceptionable);
39778
+ if (void 0 !== input["__@toStringTag@6661"]) return _vo149(input, _path, _exceptionable);
39771
39779
  if (void 0 !== input.buf) return _vo151(input, _path, _exceptionable);
39772
39780
  return _report(_exceptionable, {
39773
39781
  path: _path,
@@ -39777,7 +39785,7 @@ export const __webpack_modules__ = {
39777
39785
  })();
39778
39786
  const _vu3 = (input, _path, _exceptionable = true)=>(()=>{
39779
39787
  if (void 0 !== input.name) return _vo405(input, _path, _exceptionable);
39780
- if (void 0 !== input["__@toStringTag@6659"]) return _vo406(input, _path, _exceptionable);
39788
+ if (void 0 !== input["__@toStringTag@6661"]) return _vo406(input, _path, _exceptionable);
39781
39789
  return _report(_exceptionable, {
39782
39790
  path: _path,
39783
39791
  expected: "(LooseRsbuildPlugin | RsbuildPlugins | LooseRsbuildPlugin | Falsy)",
@@ -39882,7 +39890,7 @@ export const __webpack_modules__ = {
39882
39890
  return _vo415(input, _path, _exceptionable);
39883
39891
  })();
39884
39892
  const _vu18 = (input, _path, _exceptionable = true)=>(()=>{
39885
- if (void 0 !== input["__@toStringTag@6659"]) return _vo460(input, _path, _exceptionable);
39893
+ if (void 0 !== input["__@toStringTag@6661"]) return _vo460(input, _path, _exceptionable);
39886
39894
  return _vo0(input, _path, _exceptionable);
39887
39895
  })();
39888
39896
  const _va0 = (input, _path, _exceptionable = true)=>input.map((elem, _index738)=>(null !== elem || _report(_exceptionable, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/rspeedy-canary",
3
- "version": "0.11.1-canary-20250903-f52f8412",
3
+ "version": "0.11.1-canary-20250903-e3c0b427",
4
4
  "description": "A webpack/rspack-based frontend toolchain for Lynx",
5
5
  "keywords": [
6
6
  "webpack",