@nuxt/webpack-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 +1 -83
- package/dist/index.d.mts +1 -50462
- package/dist/index.mjs +89 -19
- package/dist/loaders/vue-module-identifier.mjs +2 -0
- package/package.json +23 -23
- 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,16 +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
|
-
import webpack from "
|
|
11
|
-
import MiniCssExtractPlugin from "mini-css-extract-plugin";
|
|
12
|
-
import WebpackBarPlugin from "webpackbar";
|
|
13
|
-
import TsCheckerPlugin from "fork-ts-checker-webpack-plugin";
|
|
10
|
+
import { MiniCssExtractPlugin, TsCheckerPlugin, WebpackBarPlugin, builder, webpack } from "#builder";
|
|
14
11
|
import { existsSync, readFileSync } from "node:fs";
|
|
15
|
-
import { pathToFileURL } from "node:url";
|
|
16
12
|
import { basename, isAbsolute, join, normalize, relative, resolve } from "pathe";
|
|
17
13
|
import { genArrayFromRaw, genObjectFromRawEntries, genString } from "knitwork";
|
|
18
14
|
import { compileStyle, parse } from "@vue/compiler-sfc";
|
|
@@ -36,6 +32,7 @@ import { normalizeWebpackManifest, precomputeDependencies } from "vue-bundle-ren
|
|
|
36
32
|
import { hash } from "ohash";
|
|
37
33
|
import { serialize } from "seroval";
|
|
38
34
|
import { parseNodeModulePath } from "mlly";
|
|
35
|
+
//#region src/plugins/dynamic-base.ts
|
|
39
36
|
const defaults = {
|
|
40
37
|
globalPublicPath: "__webpack_public_path__",
|
|
41
38
|
sourcemap: true
|
|
@@ -65,7 +62,8 @@ const DynamicBasePlugin = createUnplugin((options = {}) => {
|
|
|
65
62
|
}
|
|
66
63
|
};
|
|
67
64
|
});
|
|
68
|
-
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region src/plugins/chunk.ts
|
|
69
67
|
const pluginName = "ChunkErrorPlugin";
|
|
70
68
|
var ChunkErrorPlugin = class {
|
|
71
69
|
apply(compiler) {
|
|
@@ -97,19 +95,40 @@ if (typeof ${ensureChunk} !== "undefined") {
|
|
|
97
95
|
`;
|
|
98
96
|
}
|
|
99
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 src/plugins/ssr-styles.ts
|
|
100
119
|
const CSS_URL_RE = /url\((['"]?)(\/[^)]+?)\1\)/g;
|
|
101
120
|
const isVueFile = (id) => /\.vue(?:\?|$)/.test(id);
|
|
102
121
|
const isCSSLike = (name) => /\.(?:css|scss|sass|less|styl(?:us)?|postcss|pcss)(?:\?|$)/.test(name);
|
|
103
122
|
function normalizePath(nuxt, id) {
|
|
104
123
|
if (!id) return null;
|
|
105
|
-
const { pathname } =
|
|
124
|
+
const { pathname } = parseModuleId(id);
|
|
106
125
|
const rel = relative(nuxt.options.srcDir, pathname);
|
|
107
126
|
if (rel.startsWith("..")) return null;
|
|
108
127
|
return rel;
|
|
109
128
|
}
|
|
110
129
|
function resolveFilePath(id) {
|
|
111
130
|
if (!id) return null;
|
|
112
|
-
return
|
|
131
|
+
return parseModuleId(normalize(id)).pathname || null;
|
|
113
132
|
}
|
|
114
133
|
function sanitizeStyleAssetName(rel) {
|
|
115
134
|
return rel.replace(/[\\/]/g, "_").replace(/\.{2,}/g, "_");
|
|
@@ -236,11 +255,6 @@ var SSRStylesPlugin = class {
|
|
|
236
255
|
}
|
|
237
256
|
return null;
|
|
238
257
|
}
|
|
239
|
-
normalizeResourcePath(resource) {
|
|
240
|
-
if (!resource) return null;
|
|
241
|
-
const withoutQuery = resource.split("?")[0];
|
|
242
|
-
return resolveFilePath(withoutQuery);
|
|
243
|
-
}
|
|
244
258
|
apply(compiler) {
|
|
245
259
|
if (this.nuxt.options.dev) return;
|
|
246
260
|
const isClient = compiler.options.name === "client";
|
|
@@ -414,6 +428,8 @@ var SSRStylesPlugin = class {
|
|
|
414
428
|
return cssChunks;
|
|
415
429
|
}
|
|
416
430
|
};
|
|
431
|
+
//#endregion
|
|
432
|
+
//#region src/utils/mfs.ts
|
|
417
433
|
function createMFS() {
|
|
418
434
|
const _fs = { ...createFsFromVolume(new Volume()) };
|
|
419
435
|
_fs.join = join;
|
|
@@ -421,9 +437,14 @@ function createMFS() {
|
|
|
421
437
|
_fs.readFile = pify(_fs.readFile);
|
|
422
438
|
return _fs;
|
|
423
439
|
}
|
|
440
|
+
//#endregion
|
|
441
|
+
//#region src/utils/index.ts
|
|
442
|
+
/** @since 3.9.0 */
|
|
424
443
|
function toArray(value) {
|
|
425
444
|
return Array.isArray(value) ? value : [value];
|
|
426
445
|
}
|
|
446
|
+
//#endregion
|
|
447
|
+
//#region src/utils/config.ts
|
|
427
448
|
function createWebpackConfigContext(nuxt) {
|
|
428
449
|
return {
|
|
429
450
|
nuxt,
|
|
@@ -451,6 +472,8 @@ function fileName(ctx, key) {
|
|
|
451
472
|
}
|
|
452
473
|
return fileName;
|
|
453
474
|
}
|
|
475
|
+
//#endregion
|
|
476
|
+
//#region src/presets/assets.ts
|
|
454
477
|
function assets(ctx) {
|
|
455
478
|
ctx.config.module.rules.push({
|
|
456
479
|
test: /\.(png|jpe?g|gif|svg|webp)$/i,
|
|
@@ -481,6 +504,8 @@ function assets(ctx) {
|
|
|
481
504
|
}]
|
|
482
505
|
});
|
|
483
506
|
}
|
|
507
|
+
//#endregion
|
|
508
|
+
//#region src/plugins/warning-ignore.ts
|
|
484
509
|
var WarningIgnorePlugin = class {
|
|
485
510
|
filter;
|
|
486
511
|
constructor(filter) {
|
|
@@ -492,6 +517,12 @@ var WarningIgnorePlugin = class {
|
|
|
492
517
|
});
|
|
493
518
|
}
|
|
494
519
|
};
|
|
520
|
+
//#endregion
|
|
521
|
+
//#region 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
|
+
*/
|
|
495
526
|
const validate = (compiler) => {
|
|
496
527
|
if (compiler.options.target !== "node") logger.warn("webpack config `target` should be \"node\".");
|
|
497
528
|
if (!compiler.options.externals) logger.info("It is recommended to externalize dependencies in the server build for better build performance.");
|
|
@@ -502,10 +533,17 @@ const extractQueryPartJS = (file) => isJSRegExp.exec(file)?.[1];
|
|
|
502
533
|
const isCSSRegExp = /\.css(?:\?[^.]+)?$/;
|
|
503
534
|
const isCSS = (file) => isCSSRegExp.test(file);
|
|
504
535
|
const isHotUpdate = (file) => file.includes("hot-update");
|
|
536
|
+
//#endregion
|
|
537
|
+
//#region src/plugins/rollup-compat-dynamic-import.ts
|
|
505
538
|
const DYNAMIC_IMPORT_RE = /import\([^)]*\+\s*__webpack_require__[^+]*\)\.then/;
|
|
506
539
|
const DYNAMIC_IMPORT_REPLACE_RE = /import\([^)]*\+\s*(__webpack_require__[^+]*)\)\.then/g;
|
|
507
540
|
const HELPER_FILENAME = "_dynamic-import-helper.mjs";
|
|
508
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
|
+
*/
|
|
509
547
|
var RollupCompatDynamicImportPlugin = class {
|
|
510
548
|
apply(compiler) {
|
|
511
549
|
compiler.hooks.compilation.tap("RollupCompatDynamicImportPlugin", (compilation) => {
|
|
@@ -573,6 +611,8 @@ export function _rollupDynamicImport(chunkId) {
|
|
|
573
611
|
`;
|
|
574
612
|
}
|
|
575
613
|
};
|
|
614
|
+
//#endregion
|
|
615
|
+
//#region src/presets/base.ts
|
|
576
616
|
async function base(ctx) {
|
|
577
617
|
await applyPresets(ctx, [
|
|
578
618
|
baseAlias,
|
|
@@ -748,6 +788,8 @@ const statsMap = {
|
|
|
748
788
|
info: "normal",
|
|
749
789
|
verbose: "verbose"
|
|
750
790
|
};
|
|
791
|
+
//#endregion
|
|
792
|
+
//#region src/presets/esbuild.ts
|
|
751
793
|
function esbuild(ctx) {
|
|
752
794
|
const target = ctx.isServer ? "es2020" : "chrome85";
|
|
753
795
|
ctx.config.optimization.minimizer.push(new EsbuildPlugin());
|
|
@@ -775,6 +817,8 @@ function esbuild(ctx) {
|
|
|
775
817
|
}
|
|
776
818
|
});
|
|
777
819
|
}
|
|
820
|
+
//#endregion
|
|
821
|
+
//#region src/presets/pug.ts
|
|
778
822
|
function pug(ctx) {
|
|
779
823
|
ctx.config.module.rules.push({
|
|
780
824
|
test: /\.pug$/i,
|
|
@@ -790,6 +834,8 @@ function pug(ctx) {
|
|
|
790
834
|
}] }]
|
|
791
835
|
});
|
|
792
836
|
}
|
|
837
|
+
//#endregion
|
|
838
|
+
//#region src/utils/postcss.ts
|
|
793
839
|
const isPureObject = (obj) => obj !== null && !Array.isArray(obj) && typeof obj === "object";
|
|
794
840
|
function sortPlugins({ plugins, order }) {
|
|
795
841
|
const names = Object.keys(plugins);
|
|
@@ -835,6 +881,8 @@ async function getPostcssConfig(nuxt) {
|
|
|
835
881
|
postcssOptions
|
|
836
882
|
};
|
|
837
883
|
}
|
|
884
|
+
//#endregion
|
|
885
|
+
//#region src/presets/style.ts
|
|
838
886
|
async function style(ctx) {
|
|
839
887
|
await applyPresets(ctx, [
|
|
840
888
|
loaders,
|
|
@@ -914,6 +962,12 @@ async function createPostcssLoadersRule(ctx) {
|
|
|
914
962
|
options: config
|
|
915
963
|
};
|
|
916
964
|
}
|
|
965
|
+
//#endregion
|
|
966
|
+
//#region 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
|
+
*/
|
|
917
971
|
var VueSSRClientPlugin = class {
|
|
918
972
|
serverDist;
|
|
919
973
|
nuxt;
|
|
@@ -996,6 +1050,8 @@ var VueSSRClientPlugin = class {
|
|
|
996
1050
|
});
|
|
997
1051
|
}
|
|
998
1052
|
};
|
|
1053
|
+
//#endregion
|
|
1054
|
+
//#region src/plugins/vue/server.ts
|
|
999
1055
|
const JS_MAP_RE = /\.js\.map$/;
|
|
1000
1056
|
var VueSSRServerPlugin = class {
|
|
1001
1057
|
options;
|
|
@@ -1044,8 +1100,14 @@ var VueSSRServerPlugin = class {
|
|
|
1044
1100
|
});
|
|
1045
1101
|
}
|
|
1046
1102
|
};
|
|
1103
|
+
//#endregion
|
|
1104
|
+
//#region src/presets/vue.ts
|
|
1047
1105
|
function vue(ctx) {
|
|
1048
|
-
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
|
+
});
|
|
1049
1111
|
ctx.config.module.rules.push({
|
|
1050
1112
|
test: /\.vue$/i,
|
|
1051
1113
|
loader: "vue-loader",
|
|
@@ -1073,6 +1135,8 @@ function vue(ctx) {
|
|
|
1073
1135
|
"__VUE_PROD_HYDRATION_MISMATCH_DETAILS__": ctx.nuxt.options.debug && ctx.nuxt.options.debug.hydration
|
|
1074
1136
|
}));
|
|
1075
1137
|
}
|
|
1138
|
+
//#endregion
|
|
1139
|
+
//#region src/presets/nuxt.ts
|
|
1076
1140
|
async function nuxt(ctx) {
|
|
1077
1141
|
await applyPresets(ctx, [
|
|
1078
1142
|
base,
|
|
@@ -1083,6 +1147,8 @@ async function nuxt(ctx) {
|
|
|
1083
1147
|
vue
|
|
1084
1148
|
]);
|
|
1085
1149
|
}
|
|
1150
|
+
//#endregion
|
|
1151
|
+
//#region src/configs/client.ts
|
|
1086
1152
|
async function client(ctx) {
|
|
1087
1153
|
ctx.name = "client";
|
|
1088
1154
|
ctx.isClient = true;
|
|
@@ -1188,6 +1254,8 @@ function clientPlugins(ctx) {
|
|
|
1188
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 }));
|
|
1189
1255
|
}
|
|
1190
1256
|
}
|
|
1257
|
+
//#endregion
|
|
1258
|
+
//#region src/presets/node.ts
|
|
1191
1259
|
function node(ctx) {
|
|
1192
1260
|
ctx.config.target = "node";
|
|
1193
1261
|
ctx.config.node = false;
|
|
@@ -1216,6 +1284,8 @@ function node(ctx) {
|
|
|
1216
1284
|
maxAssetSize: Number.POSITIVE_INFINITY
|
|
1217
1285
|
};
|
|
1218
1286
|
}
|
|
1287
|
+
//#endregion
|
|
1288
|
+
//#region src/configs/server.ts
|
|
1219
1289
|
const assetPattern = /\.(?:css|s[ca]ss|png|jpe?g|gif|svg|woff2?|eot|ttf|otf|webp|webm|mp4|ogv)(?:\?.*)?$/i;
|
|
1220
1290
|
const VIRTUAL_RE = /^\0?virtual:(?:nuxt:)?/;
|
|
1221
1291
|
async function server(ctx) {
|
|
@@ -1308,6 +1378,8 @@ function serverPlugins(ctx) {
|
|
|
1308
1378
|
}));
|
|
1309
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 }));
|
|
1310
1380
|
}
|
|
1381
|
+
//#endregion
|
|
1382
|
+
//#region src/webpack.ts
|
|
1311
1383
|
const bundle = async (nuxt) => {
|
|
1312
1384
|
const webpackConfigs = await Promise.all([client, ...nuxt.options.ssr ? [server] : []].map(async (preset) => {
|
|
1313
1385
|
const ctx = createWebpackConfigContext(nuxt);
|
|
@@ -1315,6 +1387,7 @@ const bundle = async (nuxt) => {
|
|
|
1315
1387
|
await applyPresets(ctx, preset);
|
|
1316
1388
|
return ctx.config;
|
|
1317
1389
|
}));
|
|
1390
|
+
/** Remove Nitro rollup plugin for handling dynamic imports from webpack chunks */
|
|
1318
1391
|
if (!nuxt.options.dev) useNitro().hooks.hook("rollup:before", (_nitro, config) => {
|
|
1319
1392
|
const plugins = config.plugins;
|
|
1320
1393
|
const existingPlugin = plugins.findIndex((i) => i && "name" in i && i.name === "dynamic-require");
|
|
@@ -1377,10 +1450,6 @@ function wdmToH3Handler(devMiddleware) {
|
|
|
1377
1450
|
res.end("Forbidden");
|
|
1378
1451
|
return;
|
|
1379
1452
|
}
|
|
1380
|
-
event.context.webpack = {
|
|
1381
|
-
...event.context.webpack,
|
|
1382
|
-
devMiddleware: devMiddleware.context
|
|
1383
|
-
};
|
|
1384
1453
|
return await new Promise((resolve, reject) => {
|
|
1385
1454
|
res.stream = (stream) => {
|
|
1386
1455
|
resolve(stream);
|
|
@@ -1445,4 +1514,5 @@ async function compile(compiler) {
|
|
|
1445
1514
|
function defineEventHandler(handler) {
|
|
1446
1515
|
return Object.assign(handler, { __is_handler__: true });
|
|
1447
1516
|
}
|
|
1517
|
+
//#endregion
|
|
1448
1518
|
export { bundle };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { normalize, relative } from "pathe";
|
|
2
|
+
//#region 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/webpack-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,11 +25,11 @@
|
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@nuxt/friendly-errors-webpack-plugin": "^2.6.0",
|
|
28
|
-
"@vue/compiler-sfc": "3.5.
|
|
29
|
-
"autoprefixer": "^10.4.
|
|
30
|
-
"css-loader": "^7.1.
|
|
31
|
-
"css-minimizer-webpack-plugin": "^
|
|
32
|
-
"cssnano": "^7.1.
|
|
28
|
+
"@vue/compiler-sfc": "3.5.30",
|
|
29
|
+
"autoprefixer": "^10.4.27",
|
|
30
|
+
"css-loader": "^7.1.4",
|
|
31
|
+
"css-minimizer-webpack-plugin": "^8.0.0",
|
|
32
|
+
"cssnano": "^7.1.3",
|
|
33
33
|
"defu": "^6.1.4",
|
|
34
34
|
"esbuild-loader": "^4.4.2",
|
|
35
35
|
"escape-string-regexp": "^5.0.0",
|
|
@@ -39,20 +39,20 @@
|
|
|
39
39
|
"jiti": "^2.6.1",
|
|
40
40
|
"knitwork": "^1.3.0",
|
|
41
41
|
"magic-string": "^0.30.21",
|
|
42
|
-
"memfs": "^4.56.
|
|
43
|
-
"mini-css-extract-plugin": "^2.10.
|
|
44
|
-
"mlly": "^1.8.
|
|
42
|
+
"memfs": "^4.56.11",
|
|
43
|
+
"mini-css-extract-plugin": "^2.10.1",
|
|
44
|
+
"mlly": "^1.8.1",
|
|
45
45
|
"ohash": "^2.0.11",
|
|
46
46
|
"pathe": "^2.0.3",
|
|
47
47
|
"pify": "^6.1.0",
|
|
48
|
-
"postcss": "^8.5.
|
|
48
|
+
"postcss": "^8.5.8",
|
|
49
49
|
"postcss-import": "^16.1.1",
|
|
50
50
|
"postcss-import-resolver": "^2.0.0",
|
|
51
|
-
"postcss-loader": "^8.2.
|
|
51
|
+
"postcss-loader": "^8.2.1",
|
|
52
52
|
"postcss-url": "^10.1.3",
|
|
53
53
|
"pug-plain-loader": "^1.1.0",
|
|
54
|
-
"seroval": "^1.5.
|
|
55
|
-
"std-env": "^
|
|
54
|
+
"seroval": "^1.5.1",
|
|
55
|
+
"std-env": "^4.0.0",
|
|
56
56
|
"time-fix-plugin": "^2.0.7",
|
|
57
57
|
"tinyglobby": "^0.2.15",
|
|
58
58
|
"ufo": "^1.6.3",
|
|
@@ -61,27 +61,27 @@
|
|
|
61
61
|
"url-loader": "^4.1.1",
|
|
62
62
|
"vue-bundle-renderer": "^2.2.0",
|
|
63
63
|
"vue-loader": "^17.4.2",
|
|
64
|
-
"webpack": "^5.
|
|
64
|
+
"webpack": "^5.105.4",
|
|
65
65
|
"webpack-bundle-analyzer": "^5.2.0",
|
|
66
66
|
"webpack-dev-middleware": "^7.4.5",
|
|
67
67
|
"webpack-hot-middleware": "^2.26.1",
|
|
68
68
|
"webpackbar": "^7.0.0",
|
|
69
|
-
"@nuxt/kit": "4.
|
|
69
|
+
"@nuxt/kit": "4.4.2"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@rspack/core": "1.7.
|
|
72
|
+
"@rspack/core": "1.7.8",
|
|
73
73
|
"@types/webpack-bundle-analyzer": "4.7.0",
|
|
74
74
|
"@types/webpack-hot-middleware": "2.25.12",
|
|
75
|
-
"h3": "1.15.
|
|
76
|
-
"h3-next": "npm:h3@2.0.1-rc.
|
|
77
|
-
"obuild": "0.4.
|
|
78
|
-
"rollup": "4.
|
|
79
|
-
"vue": "3.5.
|
|
80
|
-
"@nuxt/schema": "4.
|
|
75
|
+
"h3": "1.15.6",
|
|
76
|
+
"h3-next": "npm:h3@2.0.1-rc.16",
|
|
77
|
+
"obuild": "0.4.32",
|
|
78
|
+
"rollup": "4.59.0",
|
|
79
|
+
"vue": "3.5.30",
|
|
80
|
+
"@nuxt/schema": "4.4.2"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
83
|
"vue": "^3.3.4",
|
|
84
|
-
"nuxt": "4.
|
|
84
|
+
"nuxt": "4.4.2"
|
|
85
85
|
},
|
|
86
86
|
"engines": {
|
|
87
87
|
"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 };
|