@utoo/pack-shared 1.3.11 → 1.4.0-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
@@ -39,9 +39,15 @@ export type TurbopackRuleCondition = {
39
39
  query?: string | RegExp;
40
40
  contentType?: string | RegExp;
41
41
  };
42
+ export type TurbopackModuleType = "asset" | "ecmascript" | "typescript" | "css" | "css-module" | "json" | "wasm" | "raw" | "node" | "bytes";
42
43
  export type TurbopackRuleConfigItem = {
43
- loaders: TurbopackLoaderItem[];
44
+ loaders?: TurbopackLoaderItem[];
44
45
  as?: string;
46
+ /**
47
+ * Controls the configured module type for matching resources.
48
+ * Mapped to Turbopack's `ConfiguredModuleType`.
49
+ */
50
+ type?: TurbopackModuleType;
45
51
  condition?: TurbopackRuleCondition;
46
52
  };
47
53
  /**
@@ -235,6 +241,20 @@ export interface ConfigComplete {
235
241
  persistentCaching?: boolean;
236
242
  nodePolyfill?: boolean;
237
243
  devServer?: DevServerConfig;
244
+ server?: {
245
+ output?: {
246
+ /** Output path for server chunks, relative to project root. */
247
+ path?: string;
248
+ /** Entry chunk filename template. Supports [name]. */
249
+ filename?: string;
250
+ /** Non-entry chunk filename template. Supports [name] and [contenthash:N]. */
251
+ chunkFilename?: string;
252
+ };
253
+ functions?: {
254
+ /** Module that exports `callServer(actionId, args)` for client-side transport. */
255
+ callServerModule: string;
256
+ };
257
+ };
238
258
  }
239
259
  export interface HtmlConfig {
240
260
  template?: string;
@@ -470,7 +470,7 @@ function compatOptimization(webpackOptimization) {
470
470
  return;
471
471
  }
472
472
  const { moduleIds, minimize, concatenateModules, usedExports } = webpackOptimization;
473
- const enableWebpackUsedExports = usedExports !== false;
473
+ const enableWebpackUsedExports = typeof usedExports === "undefined" ? undefined : usedExports !== false;
474
474
  return {
475
475
  moduleIds: moduleIds === "named"
476
476
  ? "named"
package/esm/config.d.ts CHANGED
@@ -39,9 +39,15 @@ export type TurbopackRuleCondition = {
39
39
  query?: string | RegExp;
40
40
  contentType?: string | RegExp;
41
41
  };
42
+ export type TurbopackModuleType = "asset" | "ecmascript" | "typescript" | "css" | "css-module" | "json" | "wasm" | "raw" | "node" | "bytes";
42
43
  export type TurbopackRuleConfigItem = {
43
- loaders: TurbopackLoaderItem[];
44
+ loaders?: TurbopackLoaderItem[];
44
45
  as?: string;
46
+ /**
47
+ * Controls the configured module type for matching resources.
48
+ * Mapped to Turbopack's `ConfiguredModuleType`.
49
+ */
50
+ type?: TurbopackModuleType;
45
51
  condition?: TurbopackRuleCondition;
46
52
  };
47
53
  /**
@@ -235,6 +241,20 @@ export interface ConfigComplete {
235
241
  persistentCaching?: boolean;
236
242
  nodePolyfill?: boolean;
237
243
  devServer?: DevServerConfig;
244
+ server?: {
245
+ output?: {
246
+ /** Output path for server chunks, relative to project root. */
247
+ path?: string;
248
+ /** Entry chunk filename template. Supports [name]. */
249
+ filename?: string;
250
+ /** Non-entry chunk filename template. Supports [name] and [contenthash:N]. */
251
+ chunkFilename?: string;
252
+ };
253
+ functions?: {
254
+ /** Module that exports `callServer(actionId, args)` for client-side transport. */
255
+ callServerModule: string;
256
+ };
257
+ };
238
258
  }
239
259
  export interface HtmlConfig {
240
260
  template?: string;
@@ -467,7 +467,7 @@ function compatOptimization(webpackOptimization) {
467
467
  return;
468
468
  }
469
469
  const { moduleIds, minimize, concatenateModules, usedExports } = webpackOptimization;
470
- const enableWebpackUsedExports = usedExports !== false;
470
+ const enableWebpackUsedExports = typeof usedExports === "undefined" ? undefined : usedExports !== false;
471
471
  return {
472
472
  moduleIds: moduleIds === "named"
473
473
  ? "named"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@utoo/pack-shared",
3
- "version": "1.3.11",
3
+ "version": "1.4.0-alpha.0",
4
4
  "main": "cjs/index.js",
5
5
  "module": "esm/index.js",
6
6
  "types": "esm/index.d.ts",