@rspack/core 0.5.9-canary-5c28140-20240407103120 → 0.5.9-canary-4ca6a92-20240408091245

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.
@@ -39,8 +39,8 @@ class CssExtractRspackPlugin {
39
39
  this.options.pathinfo = true;
40
40
  }
41
41
  compiler.__internal__registerBuiltinPlugin({
42
- // @ts-expect-error CssExtractPlugin is a constant value of BuiltinPlugin
43
- name: "CssExtractPlugin",
42
+ // @ts-expect-error CssExtractRspackPlugin is a constant value of BuiltinPlugin
43
+ name: "CssExtractRspackPlugin",
44
44
  options: this.normalizeOptions(this.options)
45
45
  });
46
46
  }
@@ -30,7 +30,6 @@ function hotLoader(content, context) {
30
30
  }
31
31
  `;
32
32
  }
33
- // mini-css-extract-plugin
34
33
  const loader = function loader(content) {
35
34
  if (this._compiler &&
36
35
  this._compiler.options &&
@@ -44,11 +43,19 @@ const pitch = function (request, _, data) {
44
43
  this._compiler.options &&
45
44
  this._compiler.options.experiments &&
46
45
  this._compiler.options.experiments.css) {
47
- let e = new Error("You can't use `experiments.css` and `mini-css-extract-plugin` together, please set `experiments.css` to `false`");
46
+ let e = new Error("You can't use `experiments.css` and `css-extract-rspack-plugin` together, please set `experiments.css` to `false`");
48
47
  e.stack = undefined;
49
48
  this.emitWarning(e);
50
49
  return;
51
50
  }
51
+ if (this._compiler &&
52
+ this._compiler.options &&
53
+ this._compiler.options.experiments &&
54
+ this._compiler.options.experiments.rspackFuture &&
55
+ this._compiler.options.experiments.rspackFuture.newTreeshaking === false) {
56
+ this.emitError(new Error("Cannot use CssExtractRspackPlugin without newTreeshaking"));
57
+ return;
58
+ }
52
59
  const options = this.getOptions(loader_options_json_1.default);
53
60
  const emit = typeof options.emit !== "undefined" ? options.emit : true;
54
61
  const callback = this.async();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/core",
3
- "version": "0.5.9-canary-5c28140-20240407103120",
3
+ "version": "0.5.9-canary-4ca6a92-20240408091245",
4
4
  "webpackVersion": "5.75.0",
5
5
  "license": "MIT",
6
6
  "description": "A Fast Rust-based Web Bundler",
@@ -37,12 +37,15 @@
37
37
  "babel-plugin-import": "^1.13.5",
38
38
  "copy-webpack-plugin": "5.1.2",
39
39
  "cross-env": "^7.0.3",
40
+ "del": "^6.0.0",
40
41
  "file-loader": "^6.2.0",
41
42
  "glob": "^10.3.10",
42
43
  "html-loader": "^5.0.0",
43
44
  "html-webpack-plugin": "^5.5.0",
44
45
  "identity-obj-proxy": "3.0.0",
46
+ "jest-environment-jsdom": "^29",
45
47
  "jest-serializer-path": "^0.1.15",
48
+ "jsdom": "^24.0.0",
46
49
  "less": "4.2.0",
47
50
  "less-loader": "^12.0.0",
48
51
  "node-polyfill-webpack-plugin": "3.0.0",
@@ -56,8 +59,8 @@
56
59
  "styled-components": "^6.0.8",
57
60
  "terser": "5.27.2",
58
61
  "wast-loader": "^1.11.4",
59
- "@rspack/core": "0.5.9-canary-5c28140-20240407103120",
60
- "@rspack/plugin-minify": "^0.5.9-canary-5c28140-20240407103120"
62
+ "@rspack/plugin-minify": "^0.5.9-canary-4ca6a92-20240408091245",
63
+ "@rspack/core": "0.5.9-canary-4ca6a92-20240408091245"
61
64
  },
62
65
  "dependencies": {
63
66
  "@module-federation/runtime-tools": "0.0.8",
@@ -72,7 +75,7 @@
72
75
  "webpack-sources": "3.2.3",
73
76
  "zod": "^3.21.4",
74
77
  "zod-validation-error": "1.3.1",
75
- "@rspack/binding": "0.5.9-canary-5c28140-20240407103120"
78
+ "@rspack/binding": "0.5.9-canary-4ca6a92-20240408091245"
76
79
  },
77
80
  "peerDependencies": {
78
81
  "@swc/helpers": ">=0.5.1"