@rspack/browser 2.0.6 → 2.0.7

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.
@@ -566,6 +566,7 @@ export declare enum BuiltinPluginName {
566
566
  NamedModuleIdsPlugin = 'NamedModuleIdsPlugin',
567
567
  NaturalModuleIdsPlugin = 'NaturalModuleIdsPlugin',
568
568
  DeterministicModuleIdsPlugin = 'DeterministicModuleIdsPlugin',
569
+ SyncModuleIdsPlugin = 'SyncModuleIdsPlugin',
569
570
  HashedModuleIdsPlugin = 'HashedModuleIdsPlugin',
570
571
  NaturalChunkIdsPlugin = 'NaturalChunkIdsPlugin',
571
572
  NamedChunkIdsPlugin = 'NamedChunkIdsPlugin',
@@ -616,6 +617,7 @@ export declare enum BuiltinPluginName {
616
617
  RstestPlugin = 'RstestPlugin',
617
618
  RslibPlugin = 'RslibPlugin',
618
619
  CircularModulesInfoPlugin = 'CircularModulesInfoPlugin',
620
+ CircularCheckRspackPlugin = 'CircularCheckRspackPlugin',
619
621
  CircularDependencyRspackPlugin = 'CircularDependencyRspackPlugin',
620
622
  URLPlugin = 'URLPlugin',
621
623
  JsLoaderRspackPlugin = 'JsLoaderRspackPlugin',
@@ -1917,6 +1919,14 @@ export interface RawCacheOptionsPersistent {
1917
1919
  readonly?: boolean
1918
1920
  }
1919
1921
 
1922
+ export interface RawCircularCheckRspackPluginOptions {
1923
+ failOnError?: boolean
1924
+ exclude?: RegExp
1925
+ include?: RegExp
1926
+ onDetected?: (module: Module, paths: string[]) => void
1927
+ }
1928
+
1929
+ /** Deprecated. Use `RawCircularCheckRspackPluginOptions` instead. */
1920
1930
  export interface RawCircularDependencyRspackPluginOptions {
1921
1931
  failOnError?: boolean
1922
1932
  exclude?: RegExp
@@ -2093,6 +2103,20 @@ export interface RawCopyRspackPluginOptions {
2093
2103
  patterns: Array<RawCopyPattern>
2094
2104
  }
2095
2105
 
2106
+ export interface RawCssAutoOrModuleParserOptions {
2107
+ namedExports?: boolean
2108
+ url?: boolean
2109
+ import?: boolean
2110
+ resolveImport?: boolean | ((context: { url: string, media: string | undefined, resourcePath: string, supports: string | undefined, layer: string | undefined }) => boolean)
2111
+ animation?: boolean
2112
+ container?: boolean
2113
+ customIdents?: boolean
2114
+ dashedIdents?: boolean
2115
+ function?: boolean
2116
+ grid?: boolean
2117
+ pure?: boolean
2118
+ }
2119
+
2096
2120
  export interface RawCssChunkingPluginOptions {
2097
2121
  strict?: boolean
2098
2122
  minSize?: number
@@ -2142,8 +2166,11 @@ export interface RawCssModuleParserOptions {
2142
2166
  import?: boolean
2143
2167
  resolveImport?: boolean | ((context: { url: string, media: string | undefined, resourcePath: string, supports: string | undefined, layer: string | undefined }) => boolean)
2144
2168
  animation?: boolean
2169
+ container?: boolean
2145
2170
  customIdents?: boolean
2146
2171
  dashedIdents?: boolean
2172
+ function?: boolean
2173
+ grid?: boolean
2147
2174
  }
2148
2175
 
2149
2176
  export interface RawCssParserOptions {
@@ -2151,9 +2178,6 @@ export interface RawCssParserOptions {
2151
2178
  url?: boolean
2152
2179
  import?: boolean
2153
2180
  resolveImport?: boolean | ((context: { url: string, media: string | undefined, resourcePath: string, supports: string | undefined, layer: string | undefined }) => boolean)
2154
- animation?: boolean
2155
- customIdents?: boolean
2156
- dashedIdents?: boolean
2157
2181
  }
2158
2182
 
2159
2183
  export interface RawDeterministicModuleIdsPluginOptions {
@@ -2249,6 +2273,7 @@ export interface RawExperiments {
2249
2273
  useInputFileSystem?: false | Array<RegExp>
2250
2274
  css?: boolean
2251
2275
  deferImport: boolean
2276
+ sourceImport: boolean
2252
2277
  pureFunctions: boolean
2253
2278
  }
2254
2279
 
@@ -2453,6 +2478,7 @@ export interface RawJavascriptParserOptions {
2453
2478
  commonjsMagicComments?: boolean
2454
2479
  commonjs?: boolean | { exports?: boolean | 'skipInEsm' }
2455
2480
  deferImport?: boolean
2481
+ sourceImport?: boolean
2456
2482
  /**
2457
2483
  * This option is experimental in Rspack only and subject to change or be removed anytime.
2458
2484
  * @experimental
@@ -2516,6 +2542,7 @@ export interface RawLazyCompilationOption {
2516
2542
  entries: boolean
2517
2543
  imports: boolean
2518
2544
  client: string
2545
+ reservedExternals: Array<string>
2519
2546
  }
2520
2547
 
2521
2548
  export interface RawLibManifestPluginOptions {
@@ -2663,6 +2690,7 @@ export interface RawModuleRule {
2663
2690
  issuer?: RawRuleSetCondition
2664
2691
  issuerLayer?: RawRuleSetCondition
2665
2692
  dependency?: RawRuleSetCondition
2693
+ phase?: RawRuleSetCondition
2666
2694
  scheme?: RawRuleSetCondition
2667
2695
  mimetype?: RawRuleSetCondition
2668
2696
  oneOf?: Array<RawModuleRule>
@@ -2793,9 +2821,9 @@ export interface RawParserOptions {
2793
2821
  type: "asset" | "css" | "css/auto" | "css/global" | "css/module" | "javascript" | "javascript/auto" | "javascript/dynamic" | "javascript/esm" | "json"
2794
2822
  asset?: RawAssetParserOptions
2795
2823
  css?: RawCssParserOptions
2796
- cssAuto?: RawCssModuleParserOptions
2824
+ cssAuto?: RawCssAutoOrModuleParserOptions
2797
2825
  cssGlobal?: RawCssModuleParserOptions
2798
- cssModule?: RawCssModuleParserOptions
2826
+ cssModule?: RawCssAutoOrModuleParserOptions
2799
2827
  javascript?: RawJavascriptParserOptions
2800
2828
  json?: RawJsonParserOptions
2801
2829
  }
@@ -3082,6 +3110,20 @@ export interface RawSwcJsMinimizerRspackPluginOptions {
3082
3110
  minimizerOptions: RawSwcJsMinimizerOptions
3083
3111
  }
3084
3112
 
3113
+ export declare enum RawSyncModuleIdsPluginMode {
3114
+ Read = 'read',
3115
+ Create = 'create',
3116
+ Merge = 'merge',
3117
+ Update = 'update'
3118
+ }
3119
+
3120
+ export interface RawSyncModuleIdsPluginOptions {
3121
+ path: string
3122
+ context?: string
3123
+ test?: (module: Module) => boolean
3124
+ mode?: 'read' | 'create' | 'merge' | 'update'
3125
+ }
3126
+
3085
3127
  export interface RawToOptions {
3086
3128
  context: string
3087
3129
  absoluteFilename?: string
Binary file
@@ -13,6 +13,7 @@ export interface IndependentSharePluginOptions {
13
13
  manifest?: ModuleFederationManifestPluginOptions;
14
14
  injectTreeShakingUsedExports?: boolean;
15
15
  treeShakingSharedExcludePlugins?: string[];
16
+ onBuildAssets?: (buildAssets: ShareFallback) => void;
16
17
  }
17
18
  export type ShareFallback = Record<string, [string, string, string][]>;
18
19
  export declare class IndependentSharedPlugin {
@@ -27,9 +28,11 @@ export declare class IndependentSharedPlugin {
27
28
  buildAssets: ShareFallback;
28
29
  injectTreeShakingUsedExports?: boolean;
29
30
  treeShakingSharedExcludePlugins?: string[];
31
+ onBuildAssets?: (buildAssets: ShareFallback) => void;
30
32
  name: string;
31
33
  constructor(options: IndependentSharePluginOptions);
32
34
  apply(compiler: Compiler): void;
35
+ private prepareBuildAssets;
33
36
  private createIndependentCompilers;
34
37
  private createIndependentCompiler;
35
38
  }
@@ -17,7 +17,7 @@ export declare class SharedContainerPlugin extends RspackBuiltinPlugin {
17
17
  _shareName: string;
18
18
  _globalName: string;
19
19
  constructor(options: SharedContainerPluginOptions);
20
- getData(): (string | undefined)[];
20
+ getData(): [string, string, string];
21
21
  raw(compiler: Compiler): BuiltinPlugin;
22
22
  apply(compiler: Compiler): void;
23
23
  }
@@ -1,16 +1,19 @@
1
1
  import type { Compiler } from '../Compiler';
2
2
  import type { ModuleFederationPluginOptions } from '../container/ModuleFederationPlugin';
3
+ import { type ShareFallback } from './IndependentSharedPlugin';
3
4
  export interface TreeshakingSharedPluginOptions {
4
5
  mfConfig: ModuleFederationPluginOptions;
5
6
  secondary?: boolean;
7
+ onBuildAssets?: (buildAssets: ShareFallback) => void;
6
8
  }
7
9
  export declare class TreeShakingSharedPlugin {
8
10
  mfConfig: ModuleFederationPluginOptions;
9
11
  outputDir: string;
10
12
  secondary?: boolean;
13
+ onBuildAssets?: (buildAssets: ShareFallback) => void;
11
14
  private _independentSharePlugin?;
12
15
  name: string;
13
16
  constructor(options: TreeshakingSharedPluginOptions);
14
17
  apply(compiler: Compiler): void;
15
- get buildAssets(): import("./IndependentSharedPlugin").ShareFallback;
18
+ get buildAssets(): ShareFallback;
16
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/browser",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "webpackVersion": "5.75.0",
5
5
  "license": "MIT",
6
6
  "description": "Rspack for running in the browser. This is still in early stage and may not follow the semver.",
@@ -32,9 +32,9 @@
32
32
  "@emnapi/core": "1.10.0",
33
33
  "@emnapi/runtime": "1.10.0",
34
34
  "@napi-rs/wasm-runtime": "1.1.4",
35
- "@rspack/lite-tapable": "1.1.1",
35
+ "@rspack/lite-tapable": "1.1.2",
36
36
  "@swc/types": "0.1.26",
37
- "memfs": "4.57.3",
37
+ "memfs": "4.57.6",
38
38
  "webpack-sources": "3.3.4"
39
39
  },
40
40
  "peerDependencies": {