@nuxt/webpack-builder-nightly 4.4.0-29545829.4f935ade → 4.4.0-29545957.9ed341eb

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.
@@ -0,0 +1,33 @@
1
+ # Licenses of Bundled Dependencies
2
+
3
+ The published artifact additionally contains code with the following licenses:
4
+ MIT
5
+
6
+ # Bundled Dependencies
7
+
8
+ ## nuxt-nightly
9
+
10
+ License: MIT
11
+ Repository: https://github.com/nuxt/nuxt
12
+
13
+ > The MIT License (MIT)
14
+ >
15
+ > Copyright (c) 2016-present - Nuxt Team
16
+ >
17
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
18
+ > of this software and associated documentation files (the "Software"), to deal
19
+ > in the Software without restriction, including without limitation the rights
20
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
21
+ > copies of the Software, and to permit persons to whom the Software is
22
+ > furnished to do so, subject to the following conditions:
23
+ >
24
+ > The above copyright notice and this permission notice shall be included in all
25
+ > copies or substantial portions of the Software.
26
+ >
27
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
30
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
33
+ > SOFTWARE.
package/dist/index.mjs CHANGED
@@ -3,13 +3,12 @@ import pify from "pify";
3
3
  import webpackDevMiddleware from "webpack-dev-middleware";
4
4
  import webpackHotMiddleware from "webpack-hot-middleware";
5
5
  import { defu } from "defu";
6
- import { joinURL, parseURL, withTrailingSlash } from "ufo";
6
+ import { joinURL, withTrailingSlash } from "ufo";
7
7
  import { directoryToURL, logger, resolveAlias, useNitro, useNuxt } from "@nuxt/kit";
8
8
  import { createUnplugin } from "unplugin";
9
9
  import MagicString from "magic-string";
10
10
  import { MiniCssExtractPlugin, TsCheckerPlugin, WebpackBarPlugin, builder, webpack } from "#builder";
11
11
  import { existsSync, readFileSync } from "node:fs";
12
- import { pathToFileURL } from "node:url";
13
12
  import { basename, isAbsolute, join, normalize, relative, resolve } from "pathe";
14
13
  import { genArrayFromRaw, genObjectFromRawEntries, genString } from "knitwork";
15
14
  import { compileStyle, parse } from "@vue/compiler-sfc";
@@ -97,20 +96,39 @@ if (typeof ${ensureChunk} !== "undefined") {
97
96
  }
98
97
  };
99
98
  //#endregion
99
+ //#region ../nuxt/src/core/utils/plugins.ts
100
+ /**
101
+ * Split a bundler module ID into its pathname and search (query) parts.
102
+ *
103
+ * Module IDs from Vite/webpack are already-normalized filesystem paths
104
+ * that may carry query strings (e.g. `?vue&type=style&lang=css`).
105
+ */
106
+ function parseModuleId(id) {
107
+ const qIndex = id.indexOf("?");
108
+ if (qIndex === -1) return {
109
+ pathname: id,
110
+ search: ""
111
+ };
112
+ return {
113
+ pathname: id.slice(0, qIndex),
114
+ search: id.slice(qIndex)
115
+ };
116
+ }
117
+ //#endregion
100
118
  //#region src/plugins/ssr-styles.ts
101
119
  const CSS_URL_RE = /url\((['"]?)(\/[^)]+?)\1\)/g;
102
120
  const isVueFile = (id) => /\.vue(?:\?|$)/.test(id);
103
121
  const isCSSLike = (name) => /\.(?:css|scss|sass|less|styl(?:us)?|postcss|pcss)(?:\?|$)/.test(name);
104
122
  function normalizePath(nuxt, id) {
105
123
  if (!id) return null;
106
- const { pathname } = parseURL(decodeURIComponent(pathToFileURL(id).href));
124
+ const { pathname } = parseModuleId(id);
107
125
  const rel = relative(nuxt.options.srcDir, pathname);
108
126
  if (rel.startsWith("..")) return null;
109
127
  return rel;
110
128
  }
111
129
  function resolveFilePath(id) {
112
130
  if (!id) return null;
113
- return parseURL(decodeURIComponent(pathToFileURL(id).href)).pathname || null;
131
+ return parseModuleId(normalize(id)).pathname || null;
114
132
  }
115
133
  function sanitizeStyleAssetName(rel) {
116
134
  return rel.replace(/[\\/]/g, "_").replace(/\.{2,}/g, "_");
@@ -237,11 +255,6 @@ var SSRStylesPlugin = class {
237
255
  }
238
256
  return null;
239
257
  }
240
- normalizeResourcePath(resource) {
241
- if (!resource) return null;
242
- const withoutQuery = resource.split("?")[0];
243
- return resolveFilePath(withoutQuery);
244
- }
245
258
  apply(compiler) {
246
259
  if (this.nuxt.options.dev) return;
247
260
  const isClient = compiler.options.name === "client";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/webpack-builder-nightly",
3
- "version": "4.4.0-29545829.4f935ade",
3
+ "version": "4.4.0-29545957.9ed341eb",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/nuxt/nuxt.git",
@@ -25,7 +25,7 @@
25
25
  ],
26
26
  "dependencies": {
27
27
  "@nuxt/friendly-errors-webpack-plugin": "^2.6.0",
28
- "@nuxt/kit": "npm:@nuxt/kit-nightly@4.4.0-29545829.4f935ade",
28
+ "@nuxt/kit": "npm:@nuxt/kit-nightly@4.4.0-29545957.9ed341eb",
29
29
  "@vue/compiler-sfc": "3.5.29",
30
30
  "autoprefixer": "^10.4.27",
31
31
  "css-loader": "^7.1.4",
@@ -69,7 +69,7 @@
69
69
  "webpackbar": "^7.0.0"
70
70
  },
71
71
  "devDependencies": {
72
- "@nuxt/schema": "npm:@nuxt/schema-nightly@4.4.0-29545829.4f935ade",
72
+ "@nuxt/schema": "npm:@nuxt/schema-nightly@4.4.0-29545957.9ed341eb",
73
73
  "@rspack/core": "1.7.7",
74
74
  "@types/webpack-bundle-analyzer": "4.7.0",
75
75
  "@types/webpack-hot-middleware": "2.25.12",
@@ -80,7 +80,7 @@
80
80
  "vue": "3.5.29"
81
81
  },
82
82
  "peerDependencies": {
83
- "nuxt": "npm:nuxt-nightly@4.4.0-29545829.4f935ade",
83
+ "nuxt": "npm:nuxt-nightly@4.4.0-29545957.9ed341eb",
84
84
  "vue": "^3.3.4"
85
85
  },
86
86
  "engines": {