@rsdoctor/rspack-plugin 0.3.11 → 0.3.12-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/dist/plugin.d.ts CHANGED
@@ -20,7 +20,7 @@ export declare class RsdoctorRspackPlugin<Rules extends Linter.ExtendRuleData[]>
20
20
  * @memberof RsdoctorWebpackPlugin
21
21
  */
22
22
  ensureModulesChunksGraphApplied(compiler: Plugin.BaseCompilerType<'rspack'>): void;
23
- done: (compiler: Plugin.BaseCompilerType<'rspack'>) => Promise<void>;
23
+ done: (compiler: Plugin.BaseCompilerType<"rspack">) => Promise<void>;
24
24
  getRspackConfig(compiler: Plugin.BaseCompilerType<'rspack'>): void;
25
25
  }
26
26
  //# sourceMappingURL=plugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAcrE,OAAO,KAAK,EACV,4BAA4B,EAC5B,+BAA+B,EAC/B,2BAA2B,EAC5B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEL,MAAM,EAEN,MAAM,EACP,MAAM,iBAAiB,CAAC;AAOzB,qBAAa,oBAAoB,CAAC,KAAK,SAAS,MAAM,CAAC,cAAc,EAAE,CACrE,YAAW,4BAA4B,CAAC,KAAK,CAAC;IAE9C,SAAgB,IAAI,0BAAiB;IAErC,SAAgB,GAAG,EAAE,kBAAkB,GAAG,gBAAgB,CAAC;IAE3D,SAAgB,gBAAgB,EAAE,OAAO,CAAC;IAEnC,cAAc,EAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEzC,SAAS,CAAC,eAAe,UAAS;IAE3B,YAAY,EAAE,WAAW,CAAC;IAE1B,OAAO,EAAE,+BAA+B,CAAC,KAAK,CA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,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO;IAgEjC;;;;;OAKG;IACI,+BAA+B,CACpC,QAAQ,EAAE,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC;IAKtC,IAAI,aACC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC,KAC1C,OAAO,CAAC,IAAI,CAAC,CA6Bd;IAEK,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC;CA2BnE"}
package/dist/plugin.js CHANGED
@@ -111,11 +111,16 @@ class RsdoctorRspackPlugin {
111
111
  new import_plugins.InternalSummaryPlugin(this).apply(
112
112
  compiler
113
113
  );
114
- if (this.options.features.loader && !import_common.Loader.isVue(compiler)) {
114
+ if (this.options.features.loader) {
115
115
  new import_probeLoaderPlugin.ProbeLoaderPlugin().apply(compiler);
116
- new import_plugins.InternalLoaderPlugin(this).apply(
117
- compiler
118
- );
116
+ this.sdk.addClientRoutes([
117
+ import_types.Manifest.RsdoctorManifestClientRoutes.WebpackLoaders
118
+ ]);
119
+ if (!import_common.Loader.isVue(compiler)) {
120
+ new import_plugins.InternalLoaderPlugin(this).apply(
121
+ compiler
122
+ );
123
+ }
119
124
  }
120
125
  if (this.options.features.plugins) {
121
126
  new import_plugins.InternalPluginsPlugin(this).apply(
@@ -1 +1 @@
1
- {"version":3,"file":"probeLoaderPlugin.d.ts","sourceRoot":"","sources":["../src/probeLoaderPlugin.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAOzC,qBAAa,iBAAiB;IAC5B,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,YAAY;IAoBnC,OAAO,CAAC,cAAc;CA+CvB"}
1
+ {"version":3,"file":"probeLoaderPlugin.d.ts","sourceRoot":"","sources":["../src/probeLoaderPlugin.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAQzC,qBAAa,iBAAiB;IAC5B,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,YAAY;IAoBnC,OAAO,CAAC,cAAc;CA0DvB"}
@@ -34,6 +34,7 @@ module.exports = __toCommonJS(probeLoaderPlugin_exports);
34
34
  var import_build_utils = require("@rsdoctor/core/build-utils");
35
35
  var import_path = __toESM(require("path"));
36
36
  var import_core = require("@rsdoctor/core");
37
+ var import_common = require("@rsdoctor/utils/common");
37
38
  const BuiltinLoaderName = "builtin:swc-loader";
38
39
  const ESMLoaderFile = ".mjs";
39
40
  class ProbeLoaderPlugin {
@@ -65,6 +66,7 @@ class ProbeLoaderPlugin {
65
66
  loader: import_path.default.join(__dirname, "./probeLoader.js"),
66
67
  options: {
67
68
  ..._options,
69
+ ident: void 0,
68
70
  type: "end",
69
71
  builderName: compiler.options.name
70
72
  }
@@ -73,6 +75,7 @@ class ProbeLoaderPlugin {
73
75
  loader: import_path.default.join(__dirname, "./probeLoader.js"),
74
76
  options: {
75
77
  ..._options,
78
+ ident: void 0,
76
79
  type: "start",
77
80
  builderName: compiler.options.name
78
81
  }
@@ -80,6 +83,14 @@ class ProbeLoaderPlugin {
80
83
  }
81
84
  return rule;
82
85
  };
86
+ if (import_common.Loader.isVue(compiler)) {
87
+ compiler.options.module.rules = import_build_utils.Utils.addProbeLoader2Rules(
88
+ rules,
89
+ appendRule,
90
+ (r) => !!r.loader
91
+ );
92
+ return;
93
+ }
83
94
  compiler.options.module.rules = import_build_utils.Utils.addProbeLoader2Rules(
84
95
  rules,
85
96
  appendRule,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsdoctor/rspack-plugin",
3
- "version": "0.3.11",
3
+ "version": "0.3.12-alpha.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/web-infra-dev/rsdoctor",
@@ -15,11 +15,11 @@
15
15
  "dependencies": {
16
16
  "loader-utils": "^2.0.4",
17
17
  "lodash": "^4.17.21",
18
- "@rsdoctor/core": "0.3.11",
19
- "@rsdoctor/graph": "0.3.11",
20
- "@rsdoctor/sdk": "0.3.11",
21
- "@rsdoctor/utils": "0.3.11",
22
- "@rsdoctor/types": "0.3.11"
18
+ "@rsdoctor/core": "0.3.12-alpha.0",
19
+ "@rsdoctor/graph": "0.3.12-alpha.0",
20
+ "@rsdoctor/sdk": "0.3.12-alpha.0",
21
+ "@rsdoctor/utils": "0.3.12-alpha.0",
22
+ "@rsdoctor/types": "0.3.12-alpha.0"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@rspack/core": "0.7.5",