@utoo/pack-shared 1.2.9 → 1.2.10-alpha.0

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/cjs/config.d.ts CHANGED
@@ -43,14 +43,26 @@ export type TurbopackRuleCondition = {
43
43
  } | TurbopackLoaderBuiltinCondition | {
44
44
  path?: string | RegExp;
45
45
  content?: RegExp;
46
+ query?: string | RegExp;
47
+ contentType?: string | RegExp;
46
48
  };
47
49
  export type TurbopackRuleConfigItem = {
48
50
  loaders: TurbopackLoaderItem[];
49
51
  as?: string;
50
52
  condition?: TurbopackRuleCondition;
51
53
  };
54
+ /**
55
+ * This can be an object representing a single configuration, or a list of
56
+ * loaders and/or rule configuration objects.
57
+ *
58
+ * - A list of loader path strings or objects is the "shorthand" syntax.
59
+ * - A list of rule configuration objects can be useful when each configuration
60
+ * object has different `condition` fields, but still match the same top-level
61
+ * path glob.
62
+ */
63
+ export type TurbopackRuleConfigCollection = TurbopackRuleConfigItem | (TurbopackLoaderItem | TurbopackRuleConfigItem)[];
52
64
  export interface ModuleOptions {
53
- rules?: Record<string, TurbopackRuleConfigItem>;
65
+ rules?: Record<string, TurbopackRuleConfigCollection>;
54
66
  }
55
67
  export interface ResolveOptions {
56
68
  alias?: Record<string, string | string[] | Record<string, string | string[]>>;
package/esm/config.d.ts CHANGED
@@ -43,14 +43,26 @@ export type TurbopackRuleCondition = {
43
43
  } | TurbopackLoaderBuiltinCondition | {
44
44
  path?: string | RegExp;
45
45
  content?: RegExp;
46
+ query?: string | RegExp;
47
+ contentType?: string | RegExp;
46
48
  };
47
49
  export type TurbopackRuleConfigItem = {
48
50
  loaders: TurbopackLoaderItem[];
49
51
  as?: string;
50
52
  condition?: TurbopackRuleCondition;
51
53
  };
54
+ /**
55
+ * This can be an object representing a single configuration, or a list of
56
+ * loaders and/or rule configuration objects.
57
+ *
58
+ * - A list of loader path strings or objects is the "shorthand" syntax.
59
+ * - A list of rule configuration objects can be useful when each configuration
60
+ * object has different `condition` fields, but still match the same top-level
61
+ * path glob.
62
+ */
63
+ export type TurbopackRuleConfigCollection = TurbopackRuleConfigItem | (TurbopackLoaderItem | TurbopackRuleConfigItem)[];
52
64
  export interface ModuleOptions {
53
- rules?: Record<string, TurbopackRuleConfigItem>;
65
+ rules?: Record<string, TurbopackRuleConfigCollection>;
54
66
  }
55
67
  export interface ResolveOptions {
56
68
  alias?: Record<string, string | string[] | Record<string, string | string[]>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@utoo/pack-shared",
3
- "version": "1.2.9",
3
+ "version": "1.2.10-alpha.0",
4
4
  "main": "cjs/index.js",
5
5
  "module": "esm/index.js",
6
6
  "types": "esm/index.d.ts",