react-cosmos-plugin-rspack 0.3.1 → 0.3.2
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.
|
@@ -162,9 +162,7 @@ import {
|
|
|
162
162
|
} from "react-cosmos";
|
|
163
163
|
|
|
164
164
|
// src/server/rspackConfig/getDefaultRspackConfig.ts
|
|
165
|
-
import
|
|
166
|
-
HtmlRspackPlugin
|
|
167
|
-
} from "@rspack/core";
|
|
165
|
+
import rspack from "@rspack/core";
|
|
168
166
|
|
|
169
167
|
// src/server/rspackConfig/getRspackNodeEnv.ts
|
|
170
168
|
function getRspackNodeEnv() {
|
|
@@ -216,7 +214,10 @@ function getDefaultRspackConfig(rootDir) {
|
|
|
216
214
|
});
|
|
217
215
|
}
|
|
218
216
|
plugins.push(
|
|
219
|
-
new HtmlRspackPlugin({
|
|
217
|
+
new rspack.HtmlRspackPlugin({
|
|
218
|
+
title: "React Cosmos",
|
|
219
|
+
filename: RENDERER_FILENAME
|
|
220
|
+
})
|
|
220
221
|
);
|
|
221
222
|
const config = {
|
|
222
223
|
// Besides other advantages, cheap-module-source-map is compatible with
|
|
@@ -369,9 +370,7 @@ function addAlias(alias, name, value) {
|
|
|
369
370
|
}
|
|
370
371
|
|
|
371
372
|
// src/server/rspackConfig/htmlPlugin.ts
|
|
372
|
-
import
|
|
373
|
-
HtmlRspackPlugin as HtmlRspackPlugin2
|
|
374
|
-
} from "@rspack/core";
|
|
373
|
+
import rspack2 from "@rspack/core";
|
|
375
374
|
|
|
376
375
|
// src/server/utils/omit.ts
|
|
377
376
|
function omit(o, fields) {
|
|
@@ -414,7 +413,7 @@ function ensureHtmlPlugin(plugins) {
|
|
|
414
413
|
}
|
|
415
414
|
return [
|
|
416
415
|
...plugins.filter((plugin) => !isHtmlRspackPlugin(plugin)),
|
|
417
|
-
new
|
|
416
|
+
new rspack2.HtmlRspackPlugin({
|
|
418
417
|
title: "React Cosmos",
|
|
419
418
|
filename: RENDERER_FILENAME
|
|
420
419
|
})
|
package/package.json
CHANGED