@nx/rspack 22.6.0-beta.1 → 22.6.0-beta.10

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nx/rspack",
3
3
  "description": "The Nx Plugin for Rspack contains executors and generators that support building applications using Rspack.",
4
- "version": "22.6.0-beta.1",
4
+ "version": "22.6.0-beta.10",
5
5
  "type": "commonjs",
6
6
  "repository": {
7
7
  "type": "git",
@@ -24,10 +24,10 @@
24
24
  "generators": "./generators.json",
25
25
  "executors": "./executors.json",
26
26
  "dependencies": {
27
- "@nx/devkit": "22.6.0-beta.1",
28
- "@nx/js": "22.6.0-beta.1",
29
- "@nx/module-federation": "22.6.0-beta.1",
30
- "@nx/web": "22.6.0-beta.1",
27
+ "@nx/devkit": "22.6.0-beta.10",
28
+ "@nx/js": "22.6.0-beta.10",
29
+ "@nx/module-federation": "22.6.0-beta.10",
30
+ "@nx/web": "22.6.0-beta.10",
31
31
  "@phenomnomnominal/tsquery": "~6.1.4",
32
32
  "@rspack/core": "1.6.8",
33
33
  "@rspack/dev-server": "^1.1.4",
@@ -57,11 +57,11 @@
57
57
  "webpack-node-externals": "^3.0.0"
58
58
  },
59
59
  "devDependencies": {
60
- "nx": "22.6.0-beta.1",
61
- "@nx/nest": "22.6.0-beta.1"
60
+ "nx": "22.6.0-beta.10",
61
+ "@nx/nest": "22.6.0-beta.10"
62
62
  },
63
63
  "peerDependencies": {
64
- "@module-federation/enhanced": "^0.21.2",
64
+ "@module-federation/enhanced": "^2.1.0",
65
65
  "@module-federation/node": "^2.7.21"
66
66
  },
67
67
  "nx-migrations": {
@@ -354,6 +354,6 @@ function getClientEnvironment(mode) {
354
354
  },
355
355
  // Provide a fallback for process.env itself to handle cases where code
356
356
  // accesses process.env directly (e.g., in Cypress component testing)
357
- { 'process.env': '{}' });
357
+ { 'process.env': '({})' });
358
358
  return { stringified };
359
359
  }
@@ -1 +1 @@
1
- {"version":3,"file":"postcss-cli-resources.d.ts","sourceRoot":"","sources":["../../../../../../../packages/rspack/src/plugins/utils/plugins/postcss-cli-resources.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAuBlD,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;CACpB;AAgBD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,0BAA0B;;;EA8JtE"}
1
+ {"version":3,"file":"postcss-cli-resources.d.ts","sourceRoot":"","sources":["../../../../../../../packages/rspack/src/plugins/utils/plugins/postcss-cli-resources.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAuBlD,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;CACpB;AAgBD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,0BAA0B;;;EAoKtE"}
@@ -4,6 +4,7 @@ exports.PostcssCliResources = PostcssCliResources;
4
4
  const tslib_1 = require("tslib");
5
5
  const loader_utils_1 = require("loader-utils");
6
6
  const path = tslib_1.__importStar(require("path"));
7
+ const url_1 = require("url");
7
8
  function wrapUrl(url) {
8
9
  let wrappedUrl;
9
10
  const hasSingleQuotes = url.indexOf("'") >= 0;
@@ -76,9 +77,15 @@ function PostcssCliResources(options) {
76
77
  resourceCache.set(cacheKey, outputUrl);
77
78
  return outputUrl;
78
79
  }
79
- const normalizedUrl = path.resolve(context, inputUrl.replace(/\\/g, '/'));
80
- const parsedUrl = new URL(normalizedUrl, 'file:///');
81
- const { pathname, hash, search } = parsedUrl;
80
+ // Separate URL query/hash from the file path before resolving
81
+ const [, filePath, urlSuffix] = inputUrl.match(/^([^?#]*)(.*)$/);
82
+ const resolvedPath = path.resolve(context, filePath.replace(/\\/g, '/'));
83
+ const { pathname } = (0, url_1.pathToFileURL)(resolvedPath);
84
+ let hash = '';
85
+ let search = '';
86
+ if (urlSuffix) {
87
+ ({ hash, search } = new URL(`file:///dummy${urlSuffix}`));
88
+ }
82
89
  const resolver = (file, base) => new Promise((resolve, reject) => {
83
90
  loader.resolve(base, decodeURI(file), (err, result) => {
84
91
  if (err) {
@@ -39,6 +39,6 @@ function getClientEnvironment(mode) {
39
39
  },
40
40
  // Provide a fallback for process.env itself to handle cases where code
41
41
  // accesses process.env directly (e.g., in Cypress component testing)
42
- { 'process.env': '{}' });
42
+ { 'process.env': '({})' });
43
43
  return { stringified };
44
44
  }