@rspack-debug/browser 2.0.3 → 2.0.5
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/dist/builtin-plugin/CircularModulesInfoPlugin.d.ts +7 -0
- package/dist/builtin-plugin/CssHttpExternalsRspackPlugin.d.ts +9 -0
- package/dist/builtin-plugin/ExternalsPlugin.d.ts +2 -1
- package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +2 -2
- package/dist/builtin-plugin/index.d.ts +2 -0
- package/dist/config/target.d.ts +2 -0
- package/dist/config/types.d.ts +66 -20
- package/dist/index.js +1726 -378
- package/dist/napi-binding.d.ts +27 -18
- package/package.json +2 -2
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from '../binding';
|
|
2
|
+
import type { Compiler } from '../Compiler';
|
|
3
|
+
import { RspackBuiltinPlugin } from './base';
|
|
4
|
+
export declare class CircularModulesInfoPlugin extends RspackBuiltinPlugin {
|
|
5
|
+
name: BuiltinPluginName;
|
|
6
|
+
raw(_compiler: Compiler): BuiltinPlugin;
|
|
7
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const CssHttpExternalsRspackPlugin: {
|
|
2
|
+
new (): {
|
|
3
|
+
name: string;
|
|
4
|
+
_args: [];
|
|
5
|
+
affectedHooks: keyof import("..").CompilerHooks | undefined;
|
|
6
|
+
raw(compiler: import("..").Compiler): import("../binding").BuiltinPlugin;
|
|
7
|
+
apply(compiler: import("..").Compiler): void;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
@@ -6,7 +6,8 @@ export declare class ExternalsPlugin extends RspackBuiltinPlugin {
|
|
|
6
6
|
private type;
|
|
7
7
|
private externals;
|
|
8
8
|
private placeInInitial?;
|
|
9
|
+
private fallbackType?;
|
|
9
10
|
name: BuiltinPluginName;
|
|
10
|
-
constructor(type: string, externals: Externals, placeInInitial?: boolean | undefined);
|
|
11
|
+
constructor(type: string, externals: Externals, placeInInitial?: boolean | undefined, fallbackType?: string | undefined);
|
|
11
12
|
raw(): BuiltinPlugin | undefined;
|
|
12
13
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const HttpExternalsRspackPlugin: {
|
|
2
|
-
new (
|
|
2
|
+
new (webAsync: boolean): {
|
|
3
3
|
name: string;
|
|
4
|
-
_args: [
|
|
4
|
+
_args: [webAsync: boolean];
|
|
5
5
|
affectedHooks: keyof import("..").CompilerHooks | undefined;
|
|
6
6
|
raw(compiler: import("..").Compiler): import("../binding").BuiltinPlugin;
|
|
7
7
|
apply(compiler: import("..").Compiler): void;
|
|
@@ -7,11 +7,13 @@ export * from './BundlerInfoRspackPlugin';
|
|
|
7
7
|
export { createNativePlugin, RspackBuiltinPlugin } from './base';
|
|
8
8
|
export * from './CaseSensitivePlugin';
|
|
9
9
|
export * from './ChunkPrefetchPreloadPlugin';
|
|
10
|
+
export * from './CircularModulesInfoPlugin';
|
|
10
11
|
export * from './CircularDependencyRspackPlugin';
|
|
11
12
|
export * from './CommonJsChunkFormatPlugin';
|
|
12
13
|
export * from './ContextReplacementPlugin';
|
|
13
14
|
export * from './CopyRspackPlugin';
|
|
14
15
|
export * from './CssChunkingPlugin';
|
|
16
|
+
export * from './CssHttpExternalsRspackPlugin';
|
|
15
17
|
export * from './CssModulesPlugin';
|
|
16
18
|
export * from './css-extract/index';
|
|
17
19
|
export * from './DataUriPlugin';
|
package/dist/config/target.d.ts
CHANGED
|
@@ -61,6 +61,8 @@ export type EcmaTargetProperties = {
|
|
|
61
61
|
bigIntLiteral: boolean | null;
|
|
62
62
|
/** const and let variable declarations are available */
|
|
63
63
|
const: boolean | null;
|
|
64
|
+
/** computed property names in object literals are available */
|
|
65
|
+
computedProperty: boolean | null;
|
|
64
66
|
/** method shorthand in object is available */
|
|
65
67
|
methodShorthand: boolean | null;
|
|
66
68
|
/** arrow functions are available */
|
package/dist/config/types.d.ts
CHANGED
|
@@ -268,6 +268,8 @@ export type Environment = {
|
|
|
268
268
|
bigIntLiteral?: boolean;
|
|
269
269
|
/** The environment supports const and let for variable declarations. */
|
|
270
270
|
const?: boolean;
|
|
271
|
+
/** The environment supports computed property names in object literals ('{ [expr]: value }'). */
|
|
272
|
+
computedProperty?: boolean;
|
|
271
273
|
/** The environment supports destructuring ('{ a, b } = obj'). */
|
|
272
274
|
destructuring?: boolean;
|
|
273
275
|
/** The environment supports 'document' variable. */
|
|
@@ -756,27 +758,29 @@ export type CssParserOptions = {
|
|
|
756
758
|
* Allow to enable/disables `@import` at-rules handling.
|
|
757
759
|
* @default true
|
|
758
760
|
* */
|
|
759
|
-
|
|
760
|
-
};
|
|
761
|
-
/** Options object for `css/auto` modules. */
|
|
762
|
-
export type CssAutoParserOptions = {
|
|
761
|
+
import?: boolean;
|
|
763
762
|
/**
|
|
764
|
-
*
|
|
763
|
+
* Allow to enable/disables `@import` at-rules handling.
|
|
765
764
|
* @default true
|
|
766
765
|
* */
|
|
767
|
-
|
|
766
|
+
resolveImport?: CssParserResolveImport;
|
|
768
767
|
/**
|
|
769
|
-
*
|
|
768
|
+
* Enable/disable renaming of `@keyframes`.
|
|
770
769
|
* @default true
|
|
771
|
-
|
|
772
|
-
|
|
770
|
+
*/
|
|
771
|
+
animation?: boolean;
|
|
773
772
|
/**
|
|
774
|
-
*
|
|
775
|
-
* @default
|
|
776
|
-
|
|
777
|
-
|
|
773
|
+
* Enable/disable renaming of custom identifiers.
|
|
774
|
+
* @default false
|
|
775
|
+
*/
|
|
776
|
+
customIdents?: boolean;
|
|
777
|
+
/**
|
|
778
|
+
* Enable/disable renaming of dashed identifiers, e.g. custom properties.
|
|
779
|
+
* @default false
|
|
780
|
+
*/
|
|
781
|
+
dashedIdents?: boolean;
|
|
778
782
|
};
|
|
779
|
-
/** Options object for `css/module` modules. */
|
|
783
|
+
/** Options object for `css/auto`, `css/global` and `css/module` modules. */
|
|
780
784
|
export type CssModuleParserOptions = {
|
|
781
785
|
/**
|
|
782
786
|
* Use ES modules named export for CSS exports.
|
|
@@ -792,7 +796,27 @@ export type CssModuleParserOptions = {
|
|
|
792
796
|
* Allow to enable/disables `@import` at-rules handling.
|
|
793
797
|
* @default true
|
|
794
798
|
* */
|
|
799
|
+
import?: boolean;
|
|
800
|
+
/**
|
|
801
|
+
* Allow to filter handling of `@import` at-rules.
|
|
802
|
+
* @default true
|
|
803
|
+
* */
|
|
795
804
|
resolveImport?: CssParserResolveImport;
|
|
805
|
+
/**
|
|
806
|
+
* Enable/disable renaming of `@keyframes`.
|
|
807
|
+
* @default true
|
|
808
|
+
*/
|
|
809
|
+
animation?: boolean;
|
|
810
|
+
/**
|
|
811
|
+
* Enable/disable renaming of custom identifiers.
|
|
812
|
+
* @default false
|
|
813
|
+
*/
|
|
814
|
+
customIdents?: boolean;
|
|
815
|
+
/**
|
|
816
|
+
* Enable/disable renaming of dashed identifiers, e.g. custom properties.
|
|
817
|
+
* @default false
|
|
818
|
+
*/
|
|
819
|
+
dashedIdents?: boolean;
|
|
796
820
|
};
|
|
797
821
|
type ExportsPresence = 'error' | 'warn' | 'auto' | false;
|
|
798
822
|
export type JavascriptParserCommonjsExports = boolean | 'skipInEsm';
|
|
@@ -936,7 +960,9 @@ export type ParserOptionsByModuleTypeKnown = {
|
|
|
936
960
|
/** Parser options for `css` modules. */
|
|
937
961
|
css?: CssParserOptions;
|
|
938
962
|
/** Parser options for `css/auto` modules. */
|
|
939
|
-
'css/auto'?:
|
|
963
|
+
'css/auto'?: CssModuleParserOptions;
|
|
964
|
+
/** Parser options for `css/global` modules. */
|
|
965
|
+
'css/global'?: CssModuleParserOptions;
|
|
940
966
|
/** Parser options for `css/module` modules. */
|
|
941
967
|
'css/module'?: CssModuleParserOptions;
|
|
942
968
|
/** Parser options for `javascript` modules. */
|
|
@@ -1014,6 +1040,10 @@ export type CssGeneratorExportsConvention = 'as-is' | 'camel-case' | 'camel-case
|
|
|
1014
1040
|
export type CssGeneratorExportsOnly = boolean;
|
|
1015
1041
|
export type CssGeneratorLocalIdentName = string;
|
|
1016
1042
|
export type CssGeneratorEsModule = boolean;
|
|
1043
|
+
export type CssGeneratorLocalIdentHashDigest = string;
|
|
1044
|
+
export type CssGeneratorLocalIdentHashDigestLength = number;
|
|
1045
|
+
export type CssGeneratorLocalIdentHashFunction = string;
|
|
1046
|
+
export type CssGeneratorLocalIdentHashSalt = string;
|
|
1017
1047
|
/** Generator options for css modules. */
|
|
1018
1048
|
export type CssGeneratorOptions = {
|
|
1019
1049
|
/**
|
|
@@ -1024,8 +1054,8 @@ export type CssGeneratorOptions = {
|
|
|
1024
1054
|
/** This configuration is available for improved ESM-CJS interoperability purposes. */
|
|
1025
1055
|
esModule?: CssGeneratorEsModule;
|
|
1026
1056
|
};
|
|
1027
|
-
/** Generator options for css/auto modules. */
|
|
1028
|
-
export type
|
|
1057
|
+
/** Generator options for css/auto, css/global and css/module modules. */
|
|
1058
|
+
export type CssModuleGeneratorOptions = {
|
|
1029
1059
|
/**
|
|
1030
1060
|
* Customize how CSS export names are exported to javascript modules
|
|
1031
1061
|
* @default 'as-is'
|
|
@@ -1036,13 +1066,27 @@ export type CssAutoGeneratorOptions = {
|
|
|
1036
1066
|
* If false, generate stylesheets and embed them in the template.
|
|
1037
1067
|
*/
|
|
1038
1068
|
exportsOnly?: CssGeneratorExportsOnly;
|
|
1069
|
+
/**
|
|
1070
|
+
* Digest types used for the hash.
|
|
1071
|
+
*/
|
|
1072
|
+
localIdentHashDigest?: CssGeneratorLocalIdentHashDigest;
|
|
1073
|
+
/**
|
|
1074
|
+
* Number of chars which are used for the hash.
|
|
1075
|
+
*/
|
|
1076
|
+
localIdentHashDigestLength?: CssGeneratorLocalIdentHashDigestLength;
|
|
1077
|
+
/**
|
|
1078
|
+
* Algorithm used for generation the hash.
|
|
1079
|
+
*/
|
|
1080
|
+
localIdentHashFunction?: CssGeneratorLocalIdentHashFunction;
|
|
1081
|
+
/**
|
|
1082
|
+
* Any string which is added to the hash to salt it.
|
|
1083
|
+
*/
|
|
1084
|
+
localIdentHashSalt?: CssGeneratorLocalIdentHashSalt;
|
|
1039
1085
|
/** Customize the format of the local class names generated for CSS modules */
|
|
1040
1086
|
localIdentName?: CssGeneratorLocalIdentName;
|
|
1041
1087
|
/** This configuration is available for improved ESM-CJS interoperability purposes. */
|
|
1042
1088
|
esModule?: CssGeneratorEsModule;
|
|
1043
1089
|
};
|
|
1044
|
-
/** Generator options for css/module modules. */
|
|
1045
|
-
export type CssModuleGeneratorOptions = CssAutoGeneratorOptions;
|
|
1046
1090
|
/** Generator options for json modules. */
|
|
1047
1091
|
export type JsonGeneratorOptions = {
|
|
1048
1092
|
/**
|
|
@@ -1061,7 +1105,9 @@ export type GeneratorOptionsByModuleTypeKnown = {
|
|
|
1061
1105
|
/** Generator options for css modules. */
|
|
1062
1106
|
css?: CssGeneratorOptions;
|
|
1063
1107
|
/** Generator options for css/auto modules. */
|
|
1064
|
-
'css/auto'?:
|
|
1108
|
+
'css/auto'?: CssModuleGeneratorOptions;
|
|
1109
|
+
/** Generator options for css/global modules. */
|
|
1110
|
+
'css/global'?: CssModuleGeneratorOptions;
|
|
1065
1111
|
/** Generator options for css/module modules. */
|
|
1066
1112
|
'css/module'?: CssModuleGeneratorOptions;
|
|
1067
1113
|
/** Generator options for json modules. */
|