Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions css-extract/cases/prefetch-preload/expected/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,6 @@ __webpack_require__.G = (chunkId) => {
});
}
})();
// webpack/runtime/rspack_version
(() => {
__webpack_require__.rv = () => ("2.0.0-beta.2")
})();
// webpack/runtime/auto_public_path
(() => {
var scriptUrl;
Expand Down Expand Up @@ -537,10 +533,6 @@ var chunkLoadingGlobal = self["rspackChunk"] = self["rspackChunk"] || [];
chunkLoadingGlobal.forEach(__rspack_jsonp.bind(null, 0));
chunkLoadingGlobal.push = __rspack_jsonp.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));

})();
// webpack/runtime/rspack_unique_id
(() => {
__webpack_require__.ruid = "bundler=rspack@2.0.0-beta.2";
})();
// webpack/runtime/chunk_prefetch_startup
(() => {
Expand Down
3 changes: 3 additions & 0 deletions css-extract/cases/prefetch-preload/webpack.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { CssExtractRspackPlugin } from '@rspack/core';

export default {
entry: "./index.js",
output: {
bundlerInfo: false
},
module: {
rules: [
{
Expand Down
4 changes: 1 addition & 3 deletions html-plugin/basic.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3699,9 +3699,7 @@ describe("HtmlWebpackPlugin", () => {
}
})]
},
[`
<html>
<head></head><body><span>Rspack</span>&lt;span&gt;Rspack&lt;/span&gt;</body></html>`], null);
[`<span>Rspack</span>&lt;span&gt;Rspack&lt;/span&gt;`], null);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using toContain is a bit loose for this test. Given the PR title "fix: html fragment", it seems the goal is for the output to be exactly the provided fragment. To make this test more robust and prevent future regressions where the fragment might be unintentionally wrapped in other HTML, I recommend using a regular expression with start (^) and end ($) anchors. This will ensure the output is exactly the expected fragment and nothing more.

Suggested change
[`<span>Rspack</span>&lt;span&gt;Rspack&lt;/span&gt;`], null);
[/^<span>Rspack<\/span>&lt;span&gt;Rspack&lt;\/span&gt;$/], null);

});
// TODO: html-webpack-plugin loader
// it("allows to set custom loader interpolation settings", (done) => {
Expand Down