@nuxt/rspack-builder 4.3.1 → 4.4.2
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/README.md +4 -4
- package/dist/THIRD-PARTY-LICENSES.md +3 -63
- package/dist/index.d.mts +1 -50462
- package/dist/index.mjs +88 -14
- package/dist/loaders/vue-module-identifier.mjs +2 -0
- package/package.json +22 -22
- package/dist/_chunks/libs/@vue/shared.d.mts +0 -119
- package/dist/_chunks/libs/pkg-types.d.mts +0 -23
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,
|
|
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";
|
|
@@ -33,6 +32,7 @@ import { normalizeWebpackManifest, precomputeDependencies } from "vue-bundle-ren
|
|
|
33
32
|
import { hash } from "ohash";
|
|
34
33
|
import { serialize } from "seroval";
|
|
35
34
|
import { parseNodeModulePath } from "mlly";
|
|
35
|
+
//#region ../webpack/src/plugins/dynamic-base.ts
|
|
36
36
|
const defaults = {
|
|
37
37
|
globalPublicPath: "__webpack_public_path__",
|
|
38
38
|
sourcemap: true
|
|
@@ -62,6 +62,8 @@ const DynamicBasePlugin = createUnplugin((options = {}) => {
|
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
});
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region ../webpack/src/plugins/chunk.ts
|
|
65
67
|
const pluginName = "ChunkErrorPlugin";
|
|
66
68
|
var ChunkErrorPlugin = class {
|
|
67
69
|
apply(compiler) {
|
|
@@ -93,19 +95,40 @@ if (typeof ${ensureChunk} !== "undefined") {
|
|
|
93
95
|
`;
|
|
94
96
|
}
|
|
95
97
|
};
|
|
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
|
|
118
|
+
//#region ../webpack/src/plugins/ssr-styles.ts
|
|
96
119
|
const CSS_URL_RE = /url\((['"]?)(\/[^)]+?)\1\)/g;
|
|
97
120
|
const isVueFile = (id) => /\.vue(?:\?|$)/.test(id);
|
|
98
121
|
const isCSSLike = (name) => /\.(?:css|scss|sass|less|styl(?:us)?|postcss|pcss)(?:\?|$)/.test(name);
|
|
99
122
|
function normalizePath(nuxt, id) {
|
|
100
123
|
if (!id) return null;
|
|
101
|
-
const { pathname } =
|
|
124
|
+
const { pathname } = parseModuleId(id);
|
|
102
125
|
const rel = relative(nuxt.options.srcDir, pathname);
|
|
103
126
|
if (rel.startsWith("..")) return null;
|
|
104
127
|
return rel;
|
|
105
128
|
}
|
|
106
129
|
function resolveFilePath(id) {
|
|
107
130
|
if (!id) return null;
|
|
108
|
-
return
|
|
131
|
+
return parseModuleId(normalize(id)).pathname || null;
|
|
109
132
|
}
|
|
110
133
|
function sanitizeStyleAssetName(rel) {
|
|
111
134
|
return rel.replace(/[\\/]/g, "_").replace(/\.{2,}/g, "_");
|
|
@@ -232,11 +255,6 @@ var SSRStylesPlugin = class {
|
|
|
232
255
|
}
|
|
233
256
|
return null;
|
|
234
257
|
}
|
|
235
|
-
normalizeResourcePath(resource) {
|
|
236
|
-
if (!resource) return null;
|
|
237
|
-
const withoutQuery = resource.split("?")[0];
|
|
238
|
-
return resolveFilePath(withoutQuery);
|
|
239
|
-
}
|
|
240
258
|
apply(compiler) {
|
|
241
259
|
if (this.nuxt.options.dev) return;
|
|
242
260
|
const isClient = compiler.options.name === "client";
|
|
@@ -410,6 +428,8 @@ var SSRStylesPlugin = class {
|
|
|
410
428
|
return cssChunks;
|
|
411
429
|
}
|
|
412
430
|
};
|
|
431
|
+
//#endregion
|
|
432
|
+
//#region ../webpack/src/utils/mfs.ts
|
|
413
433
|
function createMFS() {
|
|
414
434
|
const _fs = { ...createFsFromVolume(new Volume()) };
|
|
415
435
|
_fs.join = join;
|
|
@@ -417,9 +437,14 @@ function createMFS() {
|
|
|
417
437
|
_fs.readFile = pify(_fs.readFile);
|
|
418
438
|
return _fs;
|
|
419
439
|
}
|
|
440
|
+
//#endregion
|
|
441
|
+
//#region ../webpack/src/utils/index.ts
|
|
442
|
+
/** @since 3.9.0 */
|
|
420
443
|
function toArray(value) {
|
|
421
444
|
return Array.isArray(value) ? value : [value];
|
|
422
445
|
}
|
|
446
|
+
//#endregion
|
|
447
|
+
//#region ../webpack/src/utils/config.ts
|
|
423
448
|
function createWebpackConfigContext(nuxt) {
|
|
424
449
|
return {
|
|
425
450
|
nuxt,
|
|
@@ -447,6 +472,8 @@ function fileName(ctx, key) {
|
|
|
447
472
|
}
|
|
448
473
|
return fileName;
|
|
449
474
|
}
|
|
475
|
+
//#endregion
|
|
476
|
+
//#region ../webpack/src/presets/assets.ts
|
|
450
477
|
function assets(ctx) {
|
|
451
478
|
ctx.config.module.rules.push({
|
|
452
479
|
test: /\.(png|jpe?g|gif|svg|webp)$/i,
|
|
@@ -477,6 +504,8 @@ function assets(ctx) {
|
|
|
477
504
|
}]
|
|
478
505
|
});
|
|
479
506
|
}
|
|
507
|
+
//#endregion
|
|
508
|
+
//#region ../webpack/src/plugins/warning-ignore.ts
|
|
480
509
|
var WarningIgnorePlugin = class {
|
|
481
510
|
filter;
|
|
482
511
|
constructor(filter) {
|
|
@@ -488,6 +517,12 @@ var WarningIgnorePlugin = class {
|
|
|
488
517
|
});
|
|
489
518
|
}
|
|
490
519
|
};
|
|
520
|
+
//#endregion
|
|
521
|
+
//#region ../webpack/src/plugins/vue/util.ts
|
|
522
|
+
/**
|
|
523
|
+
* This file is based on Vue.js (MIT) webpack plugins
|
|
524
|
+
* https://github.com/vuejs/vue/blob/dev/src/server/webpack-plugin/util.js
|
|
525
|
+
*/
|
|
491
526
|
const validate = (compiler) => {
|
|
492
527
|
if (compiler.options.target !== "node") logger.warn("webpack config `target` should be \"node\".");
|
|
493
528
|
if (!compiler.options.externals) logger.info("It is recommended to externalize dependencies in the server build for better build performance.");
|
|
@@ -498,10 +533,17 @@ const extractQueryPartJS = (file) => isJSRegExp.exec(file)?.[1];
|
|
|
498
533
|
const isCSSRegExp = /\.css(?:\?[^.]+)?$/;
|
|
499
534
|
const isCSS = (file) => isCSSRegExp.test(file);
|
|
500
535
|
const isHotUpdate = (file) => file.includes("hot-update");
|
|
536
|
+
//#endregion
|
|
537
|
+
//#region ../webpack/src/plugins/rollup-compat-dynamic-import.ts
|
|
501
538
|
const DYNAMIC_IMPORT_RE = /import\([^)]*\+\s*__webpack_require__[^+]*\)\.then/;
|
|
502
539
|
const DYNAMIC_IMPORT_REPLACE_RE = /import\([^)]*\+\s*(__webpack_require__[^+]*)\)\.then/g;
|
|
503
540
|
const HELPER_FILENAME = "_dynamic-import-helper.mjs";
|
|
504
541
|
const HELPER_IMPORT = `import { _rollupDynamicImport } from "./${HELPER_FILENAME}";\n`;
|
|
542
|
+
/**
|
|
543
|
+
* Webpack plugin that generates rollup-compatible dynamic imports.
|
|
544
|
+
* This plugin uses webpack's native compilation hooks to override dynamic import generation
|
|
545
|
+
* and create rollup-compatible code directly during webpack's compilation process.
|
|
546
|
+
*/
|
|
505
547
|
var RollupCompatDynamicImportPlugin = class {
|
|
506
548
|
apply(compiler) {
|
|
507
549
|
compiler.hooks.compilation.tap("RollupCompatDynamicImportPlugin", (compilation) => {
|
|
@@ -569,6 +611,8 @@ export function _rollupDynamicImport(chunkId) {
|
|
|
569
611
|
`;
|
|
570
612
|
}
|
|
571
613
|
};
|
|
614
|
+
//#endregion
|
|
615
|
+
//#region ../webpack/src/presets/base.ts
|
|
572
616
|
async function base(ctx) {
|
|
573
617
|
await applyPresets(ctx, [
|
|
574
618
|
baseAlias,
|
|
@@ -744,6 +788,8 @@ const statsMap = {
|
|
|
744
788
|
info: "normal",
|
|
745
789
|
verbose: "verbose"
|
|
746
790
|
};
|
|
791
|
+
//#endregion
|
|
792
|
+
//#region ../webpack/src/presets/esbuild.ts
|
|
747
793
|
function esbuild(ctx) {
|
|
748
794
|
const target = ctx.isServer ? "es2020" : "chrome85";
|
|
749
795
|
ctx.config.optimization.minimizer.push(new EsbuildPlugin());
|
|
@@ -771,6 +817,8 @@ function esbuild(ctx) {
|
|
|
771
817
|
}
|
|
772
818
|
});
|
|
773
819
|
}
|
|
820
|
+
//#endregion
|
|
821
|
+
//#region ../webpack/src/presets/pug.ts
|
|
774
822
|
function pug(ctx) {
|
|
775
823
|
ctx.config.module.rules.push({
|
|
776
824
|
test: /\.pug$/i,
|
|
@@ -786,6 +834,8 @@ function pug(ctx) {
|
|
|
786
834
|
}] }]
|
|
787
835
|
});
|
|
788
836
|
}
|
|
837
|
+
//#endregion
|
|
838
|
+
//#region ../webpack/src/utils/postcss.ts
|
|
789
839
|
const isPureObject = (obj) => obj !== null && !Array.isArray(obj) && typeof obj === "object";
|
|
790
840
|
function sortPlugins({ plugins, order }) {
|
|
791
841
|
const names = Object.keys(plugins);
|
|
@@ -831,6 +881,8 @@ async function getPostcssConfig(nuxt) {
|
|
|
831
881
|
postcssOptions
|
|
832
882
|
};
|
|
833
883
|
}
|
|
884
|
+
//#endregion
|
|
885
|
+
//#region ../webpack/src/presets/style.ts
|
|
834
886
|
async function style(ctx) {
|
|
835
887
|
await applyPresets(ctx, [
|
|
836
888
|
loaders,
|
|
@@ -910,6 +962,12 @@ async function createPostcssLoadersRule(ctx) {
|
|
|
910
962
|
options: config
|
|
911
963
|
};
|
|
912
964
|
}
|
|
965
|
+
//#endregion
|
|
966
|
+
//#region ../webpack/src/plugins/vue/client.ts
|
|
967
|
+
/**
|
|
968
|
+
* This file is based on Vue.js (MIT) webpack plugins
|
|
969
|
+
* https://github.com/vuejs/vue/blob/dev/src/server/webpack-plugin/client.js
|
|
970
|
+
*/
|
|
913
971
|
var VueSSRClientPlugin = class {
|
|
914
972
|
serverDist;
|
|
915
973
|
nuxt;
|
|
@@ -992,6 +1050,8 @@ var VueSSRClientPlugin = class {
|
|
|
992
1050
|
});
|
|
993
1051
|
}
|
|
994
1052
|
};
|
|
1053
|
+
//#endregion
|
|
1054
|
+
//#region ../webpack/src/plugins/vue/server.ts
|
|
995
1055
|
const JS_MAP_RE = /\.js\.map$/;
|
|
996
1056
|
var VueSSRServerPlugin = class {
|
|
997
1057
|
options;
|
|
@@ -1040,8 +1100,14 @@ var VueSSRServerPlugin = class {
|
|
|
1040
1100
|
});
|
|
1041
1101
|
}
|
|
1042
1102
|
};
|
|
1103
|
+
//#endregion
|
|
1104
|
+
//#region ../webpack/src/presets/vue.ts
|
|
1043
1105
|
function vue(ctx) {
|
|
1044
|
-
ctx.
|
|
1106
|
+
ctx.nuxt.hooks.hookOnce(`${builder}:config`, () => {
|
|
1107
|
+
ctx.nuxt.hook(`${builder}:configResolved`, (configs) => {
|
|
1108
|
+
for (const config of configs) config.plugins.unshift(new (VueLoaderPlugin.default || VueLoaderPlugin)());
|
|
1109
|
+
});
|
|
1110
|
+
});
|
|
1045
1111
|
ctx.config.module.rules.push({
|
|
1046
1112
|
test: /\.vue$/i,
|
|
1047
1113
|
loader: "vue-loader",
|
|
@@ -1069,6 +1135,8 @@ function vue(ctx) {
|
|
|
1069
1135
|
"__VUE_PROD_HYDRATION_MISMATCH_DETAILS__": ctx.nuxt.options.debug && ctx.nuxt.options.debug.hydration
|
|
1070
1136
|
}));
|
|
1071
1137
|
}
|
|
1138
|
+
//#endregion
|
|
1139
|
+
//#region ../webpack/src/presets/nuxt.ts
|
|
1072
1140
|
async function nuxt(ctx) {
|
|
1073
1141
|
await applyPresets(ctx, [
|
|
1074
1142
|
base,
|
|
@@ -1079,6 +1147,8 @@ async function nuxt(ctx) {
|
|
|
1079
1147
|
vue
|
|
1080
1148
|
]);
|
|
1081
1149
|
}
|
|
1150
|
+
//#endregion
|
|
1151
|
+
//#region ../webpack/src/configs/client.ts
|
|
1082
1152
|
async function client(ctx) {
|
|
1083
1153
|
ctx.name = "client";
|
|
1084
1154
|
ctx.isClient = true;
|
|
@@ -1184,6 +1254,8 @@ function clientPlugins(ctx) {
|
|
|
1184
1254
|
if (!ctx.nuxt.options.test && (ctx.nuxt.options.typescript.typeCheck === true || ctx.nuxt.options.typescript.typeCheck === "build" && !ctx.nuxt.options.dev)) ctx.config.plugins.push(new TsCheckerPlugin({ logger }));
|
|
1185
1255
|
}
|
|
1186
1256
|
}
|
|
1257
|
+
//#endregion
|
|
1258
|
+
//#region ../webpack/src/presets/node.ts
|
|
1187
1259
|
function node(ctx) {
|
|
1188
1260
|
ctx.config.target = "node";
|
|
1189
1261
|
ctx.config.node = false;
|
|
@@ -1212,6 +1284,8 @@ function node(ctx) {
|
|
|
1212
1284
|
maxAssetSize: Number.POSITIVE_INFINITY
|
|
1213
1285
|
};
|
|
1214
1286
|
}
|
|
1287
|
+
//#endregion
|
|
1288
|
+
//#region ../webpack/src/configs/server.ts
|
|
1215
1289
|
const assetPattern = /\.(?:css|s[ca]ss|png|jpe?g|gif|svg|woff2?|eot|ttf|otf|webp|webm|mp4|ogv)(?:\?.*)?$/i;
|
|
1216
1290
|
const VIRTUAL_RE = /^\0?virtual:(?:nuxt:)?/;
|
|
1217
1291
|
async function server(ctx) {
|
|
@@ -1304,6 +1378,8 @@ function serverPlugins(ctx) {
|
|
|
1304
1378
|
}));
|
|
1305
1379
|
if (!ctx.nuxt.options.test && (ctx.nuxt.options.typescript.typeCheck === true || ctx.nuxt.options.typescript.typeCheck === "build" && !ctx.nuxt.options.dev)) ctx.config.plugins.push(new TsCheckerPlugin({ logger }));
|
|
1306
1380
|
}
|
|
1381
|
+
//#endregion
|
|
1382
|
+
//#region ../webpack/src/webpack.ts
|
|
1307
1383
|
const bundle = async (nuxt) => {
|
|
1308
1384
|
const webpackConfigs = await Promise.all([client, ...nuxt.options.ssr ? [server] : []].map(async (preset) => {
|
|
1309
1385
|
const ctx = createWebpackConfigContext(nuxt);
|
|
@@ -1311,6 +1387,7 @@ const bundle = async (nuxt) => {
|
|
|
1311
1387
|
await applyPresets(ctx, preset);
|
|
1312
1388
|
return ctx.config;
|
|
1313
1389
|
}));
|
|
1390
|
+
/** Remove Nitro rollup plugin for handling dynamic imports from webpack chunks */
|
|
1314
1391
|
if (!nuxt.options.dev) useNitro().hooks.hook("rollup:before", (_nitro, config) => {
|
|
1315
1392
|
const plugins = config.plugins;
|
|
1316
1393
|
const existingPlugin = plugins.findIndex((i) => i && "name" in i && i.name === "dynamic-require");
|
|
@@ -1373,10 +1450,6 @@ function wdmToH3Handler(devMiddleware) {
|
|
|
1373
1450
|
res.end("Forbidden");
|
|
1374
1451
|
return;
|
|
1375
1452
|
}
|
|
1376
|
-
event.context.webpack = {
|
|
1377
|
-
...event.context.webpack,
|
|
1378
|
-
devMiddleware: devMiddleware.context
|
|
1379
|
-
};
|
|
1380
1453
|
return await new Promise((resolve, reject) => {
|
|
1381
1454
|
res.stream = (stream) => {
|
|
1382
1455
|
resolve(stream);
|
|
@@ -1441,4 +1514,5 @@ async function compile(compiler) {
|
|
|
1441
1514
|
function defineEventHandler(handler) {
|
|
1442
1515
|
return Object.assign(handler, { __is_handler__: true });
|
|
1443
1516
|
}
|
|
1517
|
+
//#endregion
|
|
1444
1518
|
export { bundle };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { normalize, relative } from "pathe";
|
|
2
|
+
//#region ../webpack/src/loaders/vue-module-identifier.ts
|
|
2
3
|
const vueModuleIdentifierLoader = function(source) {
|
|
3
4
|
this.cacheable?.();
|
|
4
5
|
const { srcDir } = this.getOptions() || {};
|
|
@@ -8,4 +9,5 @@ const vueModuleIdentifierLoader = function(source) {
|
|
|
8
9
|
const moduleId = normalize(context ? relative(context, resourcePath) : resourcePath).replace(/^\.\//, "").replace(/\\/g, "/");
|
|
9
10
|
return source + `\n;__exports__.__moduleIdentifier = ${JSON.stringify(moduleId)};`;
|
|
10
11
|
};
|
|
12
|
+
//#endregion
|
|
11
13
|
export { vueModuleIdentifierLoader as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/rspack-builder",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/nuxt/nuxt.git",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@nuxt/friendly-errors-webpack-plugin": "^2.6.0",
|
|
28
|
-
"@rspack/core": "^1.7.
|
|
29
|
-
"@vue/compiler-sfc": "3.5.
|
|
30
|
-
"autoprefixer": "^10.4.
|
|
31
|
-
"css-loader": "^7.1.
|
|
32
|
-
"css-minimizer-webpack-plugin": "^
|
|
33
|
-
"cssnano": "^7.1.
|
|
28
|
+
"@rspack/core": "^1.7.8",
|
|
29
|
+
"@vue/compiler-sfc": "3.5.30",
|
|
30
|
+
"autoprefixer": "^10.4.27",
|
|
31
|
+
"css-loader": "^7.1.4",
|
|
32
|
+
"css-minimizer-webpack-plugin": "^8.0.0",
|
|
33
|
+
"cssnano": "^7.1.3",
|
|
34
34
|
"defu": "^6.1.4",
|
|
35
35
|
"esbuild-loader": "^4.4.2",
|
|
36
36
|
"escape-string-regexp": "^5.0.0",
|
|
@@ -39,22 +39,22 @@
|
|
|
39
39
|
"jiti": "^2.6.1",
|
|
40
40
|
"knitwork": "^1.3.0",
|
|
41
41
|
"magic-string": "^0.30.21",
|
|
42
|
-
"memfs": "^4.56.
|
|
43
|
-
"mlly": "^1.8.
|
|
42
|
+
"memfs": "^4.56.11",
|
|
43
|
+
"mlly": "^1.8.1",
|
|
44
44
|
"ohash": "^2.0.11",
|
|
45
45
|
"pathe": "^2.0.3",
|
|
46
46
|
"pify": "^6.1.0",
|
|
47
|
-
"postcss": "^8.5.
|
|
47
|
+
"postcss": "^8.5.8",
|
|
48
48
|
"postcss-import": "^16.1.1",
|
|
49
49
|
"postcss-import-resolver": "^2.0.0",
|
|
50
|
-
"postcss-loader": "^8.2.
|
|
50
|
+
"postcss-loader": "^8.2.1",
|
|
51
51
|
"postcss-url": "^10.1.3",
|
|
52
52
|
"pug-plain-loader": "^1.1.0",
|
|
53
|
-
"seroval": "^1.5.
|
|
54
|
-
"std-env": "^
|
|
53
|
+
"seroval": "^1.5.1",
|
|
54
|
+
"std-env": "^4.0.0",
|
|
55
55
|
"time-fix-plugin": "^2.0.7",
|
|
56
56
|
"tinyglobby": "^0.2.15",
|
|
57
|
-
"ts-checker-rspack-plugin": "^1.
|
|
57
|
+
"ts-checker-rspack-plugin": "^1.3.0",
|
|
58
58
|
"ufo": "^1.6.3",
|
|
59
59
|
"unenv": "^2.0.0-rc.24",
|
|
60
60
|
"unplugin": "^3.0.0",
|
|
@@ -65,21 +65,21 @@
|
|
|
65
65
|
"webpack-dev-middleware": "^7.4.5",
|
|
66
66
|
"webpack-hot-middleware": "^2.26.1",
|
|
67
67
|
"webpackbar": "^7.0.0",
|
|
68
|
-
"@nuxt/kit": "4.
|
|
68
|
+
"@nuxt/kit": "4.4.2"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@types/webpack-bundle-analyzer": "4.7.0",
|
|
72
72
|
"@types/webpack-hot-middleware": "2.25.12",
|
|
73
|
-
"h3": "1.15.
|
|
74
|
-
"h3-next": "npm:h3@2.0.1-rc.
|
|
75
|
-
"obuild": "0.4.
|
|
76
|
-
"rollup": "4.
|
|
77
|
-
"vue": "3.5.
|
|
78
|
-
"@nuxt/schema": "4.
|
|
73
|
+
"h3": "1.15.6",
|
|
74
|
+
"h3-next": "npm:h3@2.0.1-rc.16",
|
|
75
|
+
"obuild": "0.4.32",
|
|
76
|
+
"rollup": "4.59.0",
|
|
77
|
+
"vue": "3.5.30",
|
|
78
|
+
"@nuxt/schema": "4.4.2"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
81
|
"vue": "^3.3.4",
|
|
82
|
-
"nuxt": "4.
|
|
82
|
+
"nuxt": "4.4.2"
|
|
83
83
|
},
|
|
84
84
|
"engines": {
|
|
85
85
|
"node": "^20.19.0 || >=22.12.0"
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@vue+shared@3.5.27/node_modules/@vue/shared/dist/shared.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Patch flags are optimization hints generated by the compiler.
|
|
4
|
-
* when a block with dynamicChildren is encountered during diff, the algorithm
|
|
5
|
-
* enters "optimized mode". In this mode, we know that the vdom is produced by
|
|
6
|
-
* a render function generated by the compiler, so the algorithm only needs to
|
|
7
|
-
* handle updates explicitly marked by these patch flags.
|
|
8
|
-
*
|
|
9
|
-
* Patch flags can be combined using the | bitwise operator and can be checked
|
|
10
|
-
* using the & operator, e.g.
|
|
11
|
-
*
|
|
12
|
-
* ```js
|
|
13
|
-
* const flag = TEXT | CLASS
|
|
14
|
-
* if (flag & TEXT) { ... }
|
|
15
|
-
* ```
|
|
16
|
-
*
|
|
17
|
-
* Check the `patchElement` function in '../../runtime-core/src/renderer.ts' to see how the
|
|
18
|
-
* flags are handled during diff.
|
|
19
|
-
*/
|
|
20
|
-
declare enum PatchFlags {
|
|
21
|
-
/**
|
|
22
|
-
* Indicates an element with dynamic textContent (children fast path)
|
|
23
|
-
*/
|
|
24
|
-
TEXT = 1,
|
|
25
|
-
/**
|
|
26
|
-
* Indicates an element with dynamic class binding.
|
|
27
|
-
*/
|
|
28
|
-
CLASS = 2,
|
|
29
|
-
/**
|
|
30
|
-
* Indicates an element with dynamic style
|
|
31
|
-
* The compiler pre-compiles static string styles into static objects
|
|
32
|
-
* + detects and hoists inline static objects
|
|
33
|
-
* e.g. `style="color: red"` and `:style="{ color: 'red' }"` both get hoisted
|
|
34
|
-
* as:
|
|
35
|
-
* ```js
|
|
36
|
-
* const style = { color: 'red' }
|
|
37
|
-
* render() { return e('div', { style }) }
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
STYLE = 4,
|
|
41
|
-
/**
|
|
42
|
-
* Indicates an element that has non-class/style dynamic props.
|
|
43
|
-
* Can also be on a component that has any dynamic props (includes
|
|
44
|
-
* class/style). when this flag is present, the vnode also has a dynamicProps
|
|
45
|
-
* array that contains the keys of the props that may change so the runtime
|
|
46
|
-
* can diff them faster (without having to worry about removed props)
|
|
47
|
-
*/
|
|
48
|
-
PROPS = 8,
|
|
49
|
-
/**
|
|
50
|
-
* Indicates an element with props with dynamic keys. When keys change, a full
|
|
51
|
-
* diff is always needed to remove the old key. This flag is mutually
|
|
52
|
-
* exclusive with CLASS, STYLE and PROPS.
|
|
53
|
-
*/
|
|
54
|
-
FULL_PROPS = 16,
|
|
55
|
-
/**
|
|
56
|
-
* Indicates an element that requires props hydration
|
|
57
|
-
* (but not necessarily patching)
|
|
58
|
-
* e.g. event listeners & v-bind with prop modifier
|
|
59
|
-
*/
|
|
60
|
-
NEED_HYDRATION = 32,
|
|
61
|
-
/**
|
|
62
|
-
* Indicates a fragment whose children order doesn't change.
|
|
63
|
-
*/
|
|
64
|
-
STABLE_FRAGMENT = 64,
|
|
65
|
-
/**
|
|
66
|
-
* Indicates a fragment with keyed or partially keyed children
|
|
67
|
-
*/
|
|
68
|
-
KEYED_FRAGMENT = 128,
|
|
69
|
-
/**
|
|
70
|
-
* Indicates a fragment with unkeyed children.
|
|
71
|
-
*/
|
|
72
|
-
UNKEYED_FRAGMENT = 256,
|
|
73
|
-
/**
|
|
74
|
-
* Indicates an element that only needs non-props patching, e.g. ref or
|
|
75
|
-
* directives (onVnodeXXX hooks). since every patched vnode checks for refs
|
|
76
|
-
* and onVnodeXXX hooks, it simply marks the vnode so that a parent block
|
|
77
|
-
* will track it.
|
|
78
|
-
*/
|
|
79
|
-
NEED_PATCH = 512,
|
|
80
|
-
/**
|
|
81
|
-
* Indicates a component with dynamic slots (e.g. slot that references a v-for
|
|
82
|
-
* iterated value, or dynamic slot names).
|
|
83
|
-
* Components with this flag are always force updated.
|
|
84
|
-
*/
|
|
85
|
-
DYNAMIC_SLOTS = 1024,
|
|
86
|
-
/**
|
|
87
|
-
* Indicates a fragment that was created only because the user has placed
|
|
88
|
-
* comments at the root level of a template. This is a dev-only flag since
|
|
89
|
-
* comments are stripped in production.
|
|
90
|
-
*/
|
|
91
|
-
DEV_ROOT_FRAGMENT = 2048,
|
|
92
|
-
/**
|
|
93
|
-
* SPECIAL FLAGS -------------------------------------------------------------
|
|
94
|
-
* Special flags are negative integers. They are never matched against using
|
|
95
|
-
* bitwise operators (bitwise matching should only happen in branches where
|
|
96
|
-
* patchFlag > 0), and are mutually exclusive. When checking for a special
|
|
97
|
-
* flag, simply check patchFlag === FLAG.
|
|
98
|
-
*/
|
|
99
|
-
/**
|
|
100
|
-
* Indicates a cached static vnode. This is also a hint for hydration to skip
|
|
101
|
-
* the entire sub tree since static content never needs to be updated.
|
|
102
|
-
*/
|
|
103
|
-
CACHED = -1,
|
|
104
|
-
/**
|
|
105
|
-
* A special flag that indicates that the diffing algorithm should bail out
|
|
106
|
-
* of optimized mode. For example, on block fragments created by renderSlot()
|
|
107
|
-
* when encountering non-compiler generated slots (i.e. manually written
|
|
108
|
-
* render functions, which should always be fully diffed)
|
|
109
|
-
* OR manually cloneVNodes
|
|
110
|
-
*/
|
|
111
|
-
BAIL = -2
|
|
112
|
-
}
|
|
113
|
-
declare function generateCodeFrame(source: string, start?: number, end?: number): string;
|
|
114
|
-
type Prettify<T> = { [K in keyof T]: T[K] } & {};
|
|
115
|
-
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
|
|
116
|
-
type LooseRequired<T> = { [P in keyof (T & Required<T>)]: T[P] };
|
|
117
|
-
type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N;
|
|
118
|
-
//#endregion
|
|
119
|
-
export { UnionToIntersection as a, Prettify as i, LooseRequired as n, generateCodeFrame as o, PatchFlags as r, IfAny as t };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import "exsolve";
|
|
2
|
-
|
|
3
|
-
//#region ../../node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.d.mts
|
|
4
|
-
type StripEnums<T extends Record<string, any>> = { [K in keyof T]: T[K] extends boolean ? T[K] : T[K] extends string ? T[K] : T[K] extends object ? T[K] : T[K] extends Array<any> ? T[K] : T[K] extends undefined ? undefined : any };
|
|
5
|
-
interface TSConfig {
|
|
6
|
-
compilerOptions?: StripEnums<CompilerOptions>;
|
|
7
|
-
exclude?: string[];
|
|
8
|
-
compileOnSave?: boolean;
|
|
9
|
-
extends?: string | string[];
|
|
10
|
-
files?: string[];
|
|
11
|
-
include?: string[];
|
|
12
|
-
typeAcquisition?: TypeAcquisition;
|
|
13
|
-
references?: {
|
|
14
|
-
path: string;
|
|
15
|
-
}[];
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Defines a TSConfig structure.
|
|
19
|
-
* @param tsconfig - The contents of `tsconfig.json` as an object. See {@link TSConfig}.
|
|
20
|
-
* @returns the same `tsconfig.json` object.
|
|
21
|
-
*/
|
|
22
|
-
//#endregion
|
|
23
|
-
export { TSConfig as t };
|