@nx/webpack 22.5.3 → 22.5.4

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/webpack",
3
- "version": "22.5.3",
3
+ "version": "22.5.4",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for Webpack contains executors and generators that support building applications using Webpack.",
6
6
  "repository": {
@@ -64,11 +64,11 @@
64
64
  "webpack-dev-server": "^5.2.1",
65
65
  "webpack-node-externals": "^3.0.0",
66
66
  "webpack-subresource-integrity": "^5.1.0",
67
- "@nx/devkit": "22.5.3",
68
- "@nx/js": "22.5.3"
67
+ "@nx/devkit": "22.5.4",
68
+ "@nx/js": "22.5.4"
69
69
  },
70
70
  "devDependencies": {
71
- "nx": "22.5.3"
71
+ "nx": "22.5.4"
72
72
  },
73
73
  "publishConfig": {
74
74
  "access": "public"
@@ -1 +1 @@
1
- {"version":3,"file":"postcss-cli-resources.d.ts","sourceRoot":"","sources":["../../../../../../../packages/webpack/src/utils/webpack/plugins/postcss-cli-resources.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAuBxC,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/webpack/src/utils/webpack/plugins/postcss-cli-resources.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAuBxC,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"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PostcssCliResources = PostcssCliResources;
4
4
  const loader_utils_1 = require("loader-utils");
5
5
  const path = require("path");
6
+ const url_1 = require("url");
6
7
  function wrapUrl(url) {
7
8
  let wrappedUrl;
8
9
  const hasSingleQuotes = url.indexOf("'") >= 0;
@@ -75,9 +76,15 @@ function PostcssCliResources(options) {
75
76
  resourceCache.set(cacheKey, outputUrl);
76
77
  return outputUrl;
77
78
  }
78
- const normalizedUrl = path.resolve(context, inputUrl.replace(/\\/g, '/'));
79
- const parsedUrl = new URL(normalizedUrl, 'file:///');
80
- const { pathname, hash, search } = parsedUrl;
79
+ // Separate URL query/hash from the file path before resolving
80
+ const [, filePath, urlSuffix] = inputUrl.match(/^([^?#]*)(.*)$/);
81
+ const resolvedPath = path.resolve(context, filePath.replace(/\\/g, '/'));
82
+ const { pathname } = (0, url_1.pathToFileURL)(resolvedPath);
83
+ let hash = '';
84
+ let search = '';
85
+ if (urlSuffix) {
86
+ ({ hash, search } = new URL(`file:///dummy${urlSuffix}`));
87
+ }
81
88
  const resolver = (file, base) => new Promise((resolve, reject) => {
82
89
  loader.resolve(base, decodeURI(file), (err, result) => {
83
90
  if (err) {