@rspack-debug/browser 2.0.0-beta.7 → 2.0.0-beta.9

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.
@@ -530,6 +530,7 @@ export declare enum BuiltinPluginName {
530
530
  DynamicEntryPlugin = 'DynamicEntryPlugin',
531
531
  ExternalsPlugin = 'ExternalsPlugin',
532
532
  NodeTargetPlugin = 'NodeTargetPlugin',
533
+ EsmNodeTargetPlugin = 'EsmNodeTargetPlugin',
533
534
  ElectronTargetPlugin = 'ElectronTargetPlugin',
534
535
  EnableChunkLoadingPlugin = 'EnableChunkLoadingPlugin',
535
536
  EnableLibraryPlugin = 'EnableLibraryPlugin',
@@ -1171,6 +1172,7 @@ export interface JsRsdoctorModule {
1171
1172
  issuerPath: Array<number>
1172
1173
  bailoutReason: Array<string>
1173
1174
  sideEffectsLocations: Array<JsRsdoctorSideEffectLocation>
1175
+ exportsType: string
1174
1176
  }
1175
1177
 
1176
1178
  export interface JsRsdoctorModuleGraph {
@@ -1772,12 +1774,6 @@ export interface NapiResolveOptions {
1772
1774
  * Default `false`
1773
1775
  */
1774
1776
  enablePnp?: boolean
1775
- /**
1776
- * Path to PnP manifest file
1777
- *
1778
- * Default `None`
1779
- */
1780
- pnpManifest?: string | false
1781
1777
  }
1782
1778
 
1783
1779
  export interface NativeWatcherOptions {
@@ -2193,6 +2189,12 @@ export interface RawDynamicEntryPluginOptions {
2193
2189
  entry: () => Promise<RawEntryDynamicResult[]>
2194
2190
  }
2195
2191
 
2192
+ export interface RawEnableLibraryPluginOptions {
2193
+ libraryType: string
2194
+ preserveModules?: string
2195
+ splitChunks?: RawSplitChunksOptions
2196
+ }
2197
+
2196
2198
  export interface RawEntryDynamicResult {
2197
2199
  import: Array<string>
2198
2200
  options: JsEntryOptions
@@ -2424,33 +2426,34 @@ export interface RawJavascriptParserOptions {
2424
2426
  worker?: Array<string>
2425
2427
  overrideStrict?: string
2426
2428
  importMeta?: string
2427
- /**
2428
- * This option is experimental in Rspack only and subject to change or be removed anytime.
2429
- * @experimental
2430
- */
2431
- requireAlias?: boolean
2432
- /**
2433
- * This option is experimental in Rspack only and subject to change or be removed anytime.
2434
- * @experimental
2435
- */
2436
- requireAsExpression?: boolean
2437
- /**
2438
- * This option is experimental in Rspack only and subject to change or be removed anytime.
2439
- * @experimental
2440
- */
2441
- requireDynamic?: boolean
2442
- /**
2443
- * This option is experimental in Rspack only and subject to change or be removed anytime.
2444
- * @experimental
2445
- */
2446
- requireResolve?: boolean
2429
+ commonjsMagicComments?: boolean
2447
2430
  commonjs?: boolean | { exports?: boolean | 'skipInEsm' }
2431
+ deferImport?: boolean
2432
+ /**
2433
+ * This option is experimental in Rspack only and subject to change or be removed anytime.
2434
+ * @experimental
2435
+ */
2436
+ requireAlias?: boolean
2437
+ /**
2438
+ * This option is experimental in Rspack only and subject to change or be removed anytime.
2439
+ * @experimental
2440
+ */
2441
+ requireAsExpression?: boolean
2442
+ /**
2443
+ * This option is experimental in Rspack only and subject to change or be removed anytime.
2444
+ * @experimental
2445
+ */
2446
+ requireDynamic?: boolean
2447
+ /**
2448
+ * This option is experimental in Rspack only and subject to change or be removed anytime.
2449
+ * @experimental
2450
+ */
2451
+ requireResolve?: boolean
2448
2452
  /**
2449
2453
  * This option is experimental in Rspack only and subject to change or be removed anytime.
2450
2454
  * @experimental
2451
2455
  */
2452
2456
  importDynamic?: boolean
2453
- commonjsMagicComments?: boolean
2454
2457
  /**
2455
2458
  * This option is experimental in Rspack only and subject to change or be removed anytime.
2456
2459
  * @experimental
@@ -2461,7 +2464,11 @@ typeReexportsPresence?: string
2461
2464
  * @experimental
2462
2465
  */
2463
2466
  jsx?: boolean
2464
- deferImport?: boolean
2467
+ /**
2468
+ * This option is experimental in Rspack only and subject to change or be removed anytime.
2469
+ * @experimental
2470
+ */
2471
+ importMetaResolve?: boolean
2465
2472
  }
2466
2473
 
2467
2474
  export interface RawJsonGeneratorOptions {
@@ -2834,7 +2841,6 @@ export interface RawResolveOptions {
2834
2841
  restrictions?: (string | RegExp)[]
2835
2842
  roots?: Array<string>
2836
2843
  pnp?: boolean
2837
- pnpManifest?: string | false
2838
2844
  }
2839
2845
 
2840
2846
  export interface RawResolveOptionsWithDependencyType {
@@ -2862,7 +2868,6 @@ export interface RawResolveOptionsWithDependencyType {
2862
2868
  dependencyType?: string
2863
2869
  resolveToContext?: boolean
2864
2870
  pnp?: boolean
2865
- pnpManifest?: string | false
2866
2871
  }
2867
2872
 
2868
2873
  export interface RawResolveTsconfigOptions {
@@ -2888,6 +2893,11 @@ export interface RawRslibPluginOptions {
2888
2893
  * @default `false`
2889
2894
  */
2890
2895
  forceNodeShims?: boolean
2896
+ /**
2897
+ * Externalize Node.js builtin modules with ESM-aware external types
2898
+ * @default `false`
2899
+ */
2900
+ externalEsmNodeBuiltin?: boolean
2891
2901
  }
2892
2902
 
2893
2903
  export interface RawRstestPluginOptions {
@@ -3050,8 +3060,7 @@ export interface RealDependencyLocation {
3050
3060
  end?: SourcePosition
3051
3061
  }
3052
3062
 
3053
- /**
3054
- * this is a process level tracing, which means it would be shared by all compilers in the same process
3063
+ /** * this is a process level tracing, which means it would be shared by all compilers in the same process
3055
3064
  * only the first call would take effect, the following calls would be ignored
3056
3065
  * Some code is modified based on
3057
3066
  * https://github.com/swc-project/swc/blob/d1d0607158ab40463d1b123fed52cc526eba8385/bindings/binding_core_node/src/util.rs#L29-L58
package/dist/swc.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { TransformOutput } from './binding';
2
2
  import type { JsMinifyOptions, Options as TransformOptions } from '@swc/types';
3
- export type { TransformOutput, TransformOptions, JsMinifyOptions };
3
+ export type { JsMinifyOptions, TransformOptions, TransformOutput };
4
4
  export declare function minify(source: string, options?: JsMinifyOptions): Promise<TransformOutput>;
5
5
  export declare function minifySync(source: string, options?: JsMinifyOptions): TransformOutput;
6
6
  export declare function transform(source: string, options?: TransformOptions): Promise<TransformOutput>;